Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
389 views
in Review of C++ Programming by (30.5k points)
closed by

Name   : Jose

Roll no :  20

Age  :  17

Weight :  45,650

Consider the above data, we know that there are different types of data are used in the computer. Explain different data types used in C++

1 Answer

+1 vote
by (30.4k points)
selected by
 
Best answer

1. int data type: 

It is used to store whole numbers without fractional (decimal point) part. It can be either negative or positive. It consumes 2 bytes(16 bits) of memory.i.e. 216 = 65536 numbers. We can store a number in between -32768 to + 32767.

2. char data type: 

Any symbol from the keyboard, eg. ‘A’,’9′,…. It consumes one byte( 8 bits) of memory. It is internally treated as integers, i.e. 28 = 256 characters. Each character is having a ASCII code, ‘a’ is having ASCII code 97 and zero is having ASCII code 48.

3. float data type:

It is used to store real numbers i.e. the numbers with decimal point. It uses 4 bytes(32 bits) of memory. 

Eg. 67.89, 89.9 E15

4. double data type: 

It is used to store very large real numbers. It uses 8 bytes(64 bits) of memory. 

5. void data type: 

void means nothing. It is used to represent a function returns nothing.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...