A
Q. Which of the following is the correct output for the program given below?
#include <stdio.h> int main ( ) { printf ("%d %d %d\n" , sizeof(2.19f), sizeof(2.19), sizeof (2.19l)); return 0 ; }
The sizeof() operator returns the size (in bytes) of a data type or expression. Let's analyze each argument inside printf:
Breakdown of sizeof() calls:
- sizeof(2.19f) → 2.19f is a float, which typically takes 4 bytes.
- sizeof(2.19) → 2.19 is a double (default type for floating-point literals in C), which typically takes 8 bytes.
- sizeof(2.19l) → 2.19l (or 2.19L) is a long double, which usually takes 10 bytes on most systems (but may be 12 or 16 bytes on some architectures).
Thus, the output is 4 8 10.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. Difference between C Arrays, ary[10] and cry[10][10] is.
Q. What will be the output of following c program?
Q. What is the output of the C Program?
Q. What will be the output of the following C code?
Q. Which of the following will be the type of ‘res’?
Q. What is CPP in C programming?
Q. Variables of type auto, static and extern are all stored in?
Q. For 16-bit compiler allowable range for integer constants is ______ ?
Discusssion
Login to discuss.