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


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