Floating Point Issues on C related Questions and Answers - Page 2

Question 12 : Loss in precision occurs for typecasting from____________
1. char to short
2. float to double
3. long to float
4. float to int
View Answer   Discuss with Members

Question 13 : How many digits are present after decimal in float value?
1. 1
2. 3
3. 6
4. 16
View Answer   Discuss with Members

Question 14 : Which of the following % operation is invalid?
1. 2 % 4;
2. 2 % 4l;
3. 2 % 4f;
4. Both 2 % 4l; and 2 % 4f;
View Answer   Discuss with Members

Question 15 : Select the odd one out with respect to type?
1. char
2. int
3. long
4. float
View Answer   Discuss with Members

Question 16 : Which of the following is not an operator in C?
1. ,
2. sizeof()
3. ~
4. None of the mentioned
View Answer   Discuss with Members

Question 18 : Which of the following statement obtains the remainder on dividing 5.5 by 1.3 ?
1. rem = (5.5 % 1.3)
2. rem = modf(5.5, 1.3)
3. rem = fmod(5.5, 1.3)
4. Error: we can't divide
View Answer   Discuss with Members

Question 19 : What will you do to treat the constant 3.14 as a float?
1. use float(3.14f)
2. use 3.14f
3. use f(3.14)
4. use (f)(3.14)
View Answer   Discuss with Members

Question 20 : 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?
1. ABCD
2. DCBA
3. 0xABCD
4. Depends on big endian or little endian architecture
View Answer   Discuss with Members


View 11 - 20 of 24 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter