Mega Code Archive

 
Categories / C++ Tutorial / Data Types
 

Variable size of bool

#include <iostream>    int main() {    using std::cout;       cout << "The size of a bool is:"      << sizeof(bool)   << " bytes.\n";       return 0; } The size of a bool is:1 bytes.