What will be output if you will compile and execute the following c code?
void main(){
printf("%d",sizeof(5.2));
}
(A) 2
(B) 4
(C) 8
(D) 10
(E) Compiler error
________________________________________
Explanation:
Default type of floating point constant is double. So 5.2 is double constant and its size is 8 byte.
No comments:
Post a Comment