| 1. What are the different types of real data type in C ? | ||||||||
- Answer&Explanation
Answer:Option C
Explanation : The floating point data types are called real data types. Hence float, double, and long double are real data types. |
| 2. What will you do to treat the constant 3.14 as a long double? | ||||||||
- Answer&Explanation
Answer:Option B
Explanation : Given 3.14 is a double constant. To specify 3.14 as long double, we have to add L to the 3.14. (i.e 3.14L) |
3. If the binary eauivalent of 5.375 in normalised form is 0100 0000 1010 1100 0000 0000 0000 0000, what will be the output of the program (on intel machine)? | ||||||||
- Answer&Explanation
Answer:Option C
Explanation : No answer description available for this question. |
| 4. Which of the following range is a valid long double (Turbo C in 16 bit DOS OS) ? | ||||||||
- Answer&Explanation
Answer:Option A
Explanation : The range of long double is 3.4E-4932 to 1.1E+4932 |
5. Which statement will you add in the following program to work it correctly? | ||||||||
- Answer&Explanation
Answer:Option B
Explanation : math.h is a header file in the standard library of C programming language designed for basic mathematical operations. |
| 6. We want to round off x, a float, to an int value, The correct way to do is | ||||||||
- Answer&Explanation
Answer:Option A
Explanation : Rounding off a value means replacing it by a nearest value that is approximately equal or smaller or greater to the given number.
Output: |
| 7. The binary equivalent of 5.375 is | ||||||||
- Answer&Explanation
Answer:Option B
Explanation : No answer description available for this question. |
| 8. A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored? | ||||||||
- Answer&Explanation
Answer:Option D
Explanation : No answer description available for this question |
| 9. What will you do to treat the constant 3.14 as a float? | ||||||||
- Answer&Explanation
Answer:Option B
Explanation : Given 3.14 is a double constant. |
| 10. Which of the following statement obtains the remainder on dividing 5.5 by 1.3 ? | ||||||||
- Answer&Explanation
Answer:Option C
Explanation : fmod(x,y) - Calculates x modulo y, the remainder of x/y. Output: |