Posts

Showing posts with the label dadatypes

Datatypes In C++

Image
 Datatypes in C++ Datatypes determines the type and size of the variable. the below image shows the different types of the datatypes in C++. The primitive datatypes also known as Built-in Datatypes are the basic datatypes, Integer (int): As its name suggests this type stores integer values,  its size is 2 or 4 bytes. depending upon the architecture of the computer. Float (float) & Double (double): Again the name suggests, this type store floating point values, the size of the float is 4 bytes, and the size of the double is 8 bytes. Character (char): this type stores the single character, they are enclosed in single quotes (' '). the size of the char is 1 byte. apart from the above four datatypes two more datatypes boolean (bool), and wide character constant (wchar_t) were added in C++. Wide Character constant (wchar_t): Wide character wchar_t is similar to the char data type, except its size is 2 bytes instead of 1. It is used to represent characters that require more memo...