Q. | What will be output when you will execute following c code? #include int main()
{
double num=5.2;
int var=5;
printf("%d\t",sizeof(!num));
printf("%d\t",sizeof(var=15/2));
printf("%d",var);
return 0;
}
Choose all that apply:
|
|||||||
|
Answer: | Option B | |
Explaination: |
This is because 7.0 is treated as double (double precision) and not as float (single precision). To make it float, write it as 7.0f. |
Discussion
Your Comments Goes here... |
Name | Discussion |
---|