1 Data types in c++
2 Built-in User Defined Derived
3 ---------- ----------- ------------
4 void, int, structure, array,
5 char, float, union, function,
6 double, bool, enum, pointer,
7 long long class, reference
8 Wide Character typedef
1Long
2Data Type Size (in bytes) Range
3long int 4 -2,147,483,648 to 2,147,483,647
4unsigned long int 4 0 to 4,294,967,295
5long long int 8 -(2^63) to (2^63)-1
6unsigned long long int 8 0 to 18,446,744,073,709,551,615
1int myNum = 5; // Integer (whole number)
2float myFloatNum = 5.99; // Floating point number
3double myDoubleNum = 9.98; // Floating point number
4char myLetter = 'D'; // Character
5bool myBoolean = true; // Boolean
6string myText = "Hello"; // String