Sail E0 Webinar
Question
What is the output of this C code?
int main()
{
int i = 10;
void *p = &i;
printf("%f\n", *(float*)p);
return 0;
}
Options:
A .  Compile time error
B .  Undefined behaviour
C .  10
D .  0.000000
Answer: Option D


None.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers