-
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 ;
}
-
- 4 4 4
- 4 8 8
- 4 8 10
- 4 8 12
Correct Option: B
sizeof(2.19f) here '2.19f' specifies the float data type. Hence size of float is 4 bytes.
sizeof(2.19) here '2.19' specifies the double data type. Hence size of float is 8 bytes.
sizeof(2.19l) here '2.19l' specifies the long double data type. Hence size of float is 10 bytes.