Can anyone tell me about different data types in cpp and their identifiers and uses. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Can anyone tell me about different data types in cpp and their identifiers and uses.

I getting confused about int,var,float and etc words.can anyine please explain them in brief. thank you,,,

12th Mar 2018, 5:37 AM
Just Me
Just Me - avatar
2 ответов
+ 6
Integer: Keyword used for integer data types is int. Integers typically requires 4 bytes of memory space and ranges from -2147483648 to 2147483647. Character: Character data type is used for storing characters. Keyword used for character data type is char. Characters typically requires 1 byte of memory space and ranges from -128 to 127 or 0 to 255. Boolean: Boolean data type is used for storing boolean or logical values. A boolean variable can store either true or false. Keyword used for boolean data type is bool. Floating Point: Floating Point data type is used for storing single precision floating point values or decimal values. Keyword used for floating point data type is float. Float variables typically requires 4 byte of memory space. Double Floating Point: Double Floating Point data type is used for storing double precision floating point values or decimal values. Keyword used for double floating point data type is double. Double variables typically requires 8 byte of memory space.
12th Mar 2018, 5:44 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 5
Use In-course Glossary to look up for data types, identifiers, etc.
12th Mar 2018, 5:43 AM
Ekansh