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
1Data Type Size
2int (Integer) = 5, 6, 7 2
3float (Floating Value) = -3.67, 2.67 4
4double (Double of float) = -7.8746 8
5char (Character) = 'a', 'b', 'A' 1
6string (Multiple chars) = "Hello World" No of Chars
7bool (Boolean) = true, false true = 1, false = 0
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