What is mean by datatypes in C++ and what is the sizes of different datatypes?
Data Types are used to identify what kind of data a variable is holding...such as if a variable is integer or char type? For example ..
a = 1; or a = "orange";
how will you recognize what type of value the variable "a" have ..at runtime?
That is the only reason we use datatypes like int, char, double etc..
List of DataTypes
char - 1byte
short int (short) - 2bytes
int - 4bytes
long int (long) - 4bytes
bool - 1byte (true or false)
float - 4bytes
double - 8bytes
long double - 8bytes
wchar_t - 2 or 4 bytes
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.