Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6
Function sizeof() eturns size in bytes of the variable of some type. E.g. #include <iostream> using namespace std; int main() { cout << sizeof(char) << endl; cout << sizeof(int) << endl; cout << sizeof(string) << endl; cout << sizeof(bool) << endl; return 0; } // outputs // 1 // 4 // 4 // 1 Further reference: http://en.cppreference.com/w/cpp/language/sizeof
2nd Jan 2017, 12:54 PM
Hatsy Rei
Hatsy Rei - avatar