23
TypeSize (typical)Range / Use
bool1 bytetrue / false
char1 byte-128 to 127, one character
int4 bytesabout ±2.1 × 109
long long8 bytesabout ±9.2 × 1018
float4 bytes~7 decimal digits
double8 bytes~15 decimal digits
stringvariestext (std::string)
C++ 3 lines
cout << sizeof(int) << endl;        // 4
cout << sizeof(long long) << endl;  // 8
cout << INT_MAX << endl;            // 2147483647 (needs <climits>)

Type casting: (double)a / b or static_cast<double>(a) / b gives a decimal result; a / b with two ints drops the fraction.