Question 7809 – Operating-Systems
March 6, 2024
Question 10300 – Database-Management-System
March 6, 2024
Question 7809 – Operating-Systems
March 6, 2024
Question 10300 – Database-Management-System
March 6, 2024

Question 4074 – UGC NET CS 2005 Dec-Paper-2

What is the output of the following C-program
main()
{
printf(”%d%d%d”, sizeof(3.14f), sizeof(3.14), sizeof(3.141));
}

Correct Answer: E

Question 11 Explanation: 
The sizeof operator will print number of bytes of a data type.
sizeof(3.14f) → It will consider as float data type. The float data type size is 4 bytes.
sizeof(3.14) → It will consider as double data type. The double data type size is 8 bytes.
sizeof(3.141) → It will consider as double data type. The double data type size is 8 bytes.
Output= 4 8 8
Note: The exact size of each of these 3 types depends on the C compiler implementation (or) platform
A
4 4 4
B
4 8 10
C
8 4 8
D
8 8 8
E
None of the above
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!