Wednesday, November 20, 2024

Primitive Data Types in C++

 

Integer: The keyword used for integer data types is int. Integers typically require 4 bytes of memory space and range from -2147483648 to 2147483647.

Character: Character data type is used to store characters. The keyword used for character data type is char. Characters typically require 1 byte of memory space and range from -128 to 127 or 0 to 255.

Boolean: The Boolean data type is used to store Boolean or logical values. A Boolean variable can store true or false. The keyword used for Boolean data type is bool.


Floating Point: The floating point data type is used to store single-precision floating-point values or decimal values. The keyword used for floating-point data type is float. Float variables typically require 4 bytes of memory space.

Double Floating Point: The double floating point data type is used to store double-precision floating-point values or decimal values. The keyword used for the double floating-point data type is double. Double variables typically require 8 bytes of memory space.

Void: Void means without any value. A void data type represents a valueless entity. A void data type is used for a function that does not return a value.

Wide Character: Wide character data type is also a character data type but this data type has a larger size than the normal 8-bit data type. Represented by wchar_t. It is usually 2 or 4 bytes long.

sizeof() operator: The sizeof() operator is used to find the number of bytes occupied by a variable/data type in computer memory.

TCCI-Tririd computer coaching Institute offers  various computer course like C,C++,HTML, CSS, Data Structure ,Database Management System, Compiler Design,Python,Java,.Net .,Word,Excel,Power Point …..etc.…….All computer courses for BCA, MCA, BSC-MSc. IT, Diploma-Degree Engineering, school-students (any standard), and any person are taught at the institute by highly qualified and experienced faculties.

For More Information:

Call us @ +91 98256 18292

Visit us @ https://tccicomputercoaching.wordpress.com/

No comments:

Post a Comment