Saved Bookmarks
| 1. |
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 |
|
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. |
|