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
173 views
in Review of C++ Programming by (30.5k points)
closed by

Write valid reasons after reading the following statements in C++ and comment on their correctness by give reasons. 

1. char num = 66; char num – B’; 

2. 35 and 35L are different 

3. The number 14,016 and OxE are one and the same 

4. Char data type is often said to be an integer type 

5. To store the value 4.15 float data type is preferred over double

1 Answer

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

1. The ASCII number of B is 66. So it is equivalent. 

2. 35 is of integer type but 35L is Long 

3. The decimal number 14 is represented in octal is 016 and in hexadecimal is OxE. 

4. Internally char data type stores ASCII numbers. 

5. To store the value 4.15 oat data type is better because float requires only 4 bytes while double needs 8 bytes hence we can save the memory.

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

...