Computer Science, asked by kumarneel70, 1 year ago

explain about the different data types in c++

Answers

Answered by GShashank1
6
primitive data typesavailable in C++.

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.
: Void means without any value. void datatype represents a valueless entity. Void data type is used for those function which does not returns a value.WIDE CHARACTER: Wide character data type is also a character data type but this data type has size greater than the normal size
Similar questions