#include <iostream>
#include <string.h>
using namespace std;
int main()
{
char *str = "ABC";
cout << strlen(str) << endl;
return 0;
}
char* a = "ABC";
int length = sizeof(a)/sizeof(char);
#include <iostream>
using namespace std;
int main(){
cout << "Size of char: " << sizeof(char) << " byte" << endl;
cout << "Size of int: " << sizeof(int) << " bytes" << endl;
cout << "Size of float: " << sizeof(float) << " bytes" << endl;
cout << "Size of double: " << sizeof(double) << " bytes" << endl;
return 0;
}
Code Example |
---|
Cpp :: parallelize for loop c++ |
Cpp :: c++ compare time |
Cpp :: adding elements to a vector c++ |
Cpp :: c++ read image opencv in folder |
Cpp :: c++ reverse integer |
Cpp :: cpp case |
Cpp :: http.begin() error |
Cpp :: Frequency of a substring in a string C++ |
Cpp :: cpp unions |
Cpp :: c++ vector average |
Cpp :: data types ranges c++ |
Cpp :: c++ check if vector is sorted |
Cpp :: search a word in cpp file |
Cpp :: c++ simple car game |
Cpp :: find in string c++ |
Cpp :: find primes in cpp |
Cpp :: C++ array sort method |
Cpp :: what does the modularity mean in c++ |
Cpp :: change int to string c++ |
Cpp :: C++ program that prints the prime numbers from 1 to 1000. |
Cpp :: calloc c++ |
Cpp :: delete dynamic array c++ |
Cpp :: C++ Vector Iterator Syntax |
Cpp :: C++ Volume of a Cylinder |
Cpp :: case label in c++ |
Cpp :: untitled goose game |
Cpp :: print vector c++ |
Cpp :: What is the "--" operator in C/C++? |
Cpp :: string search c++ |
Cpp :: Converting to string c++ |