Sail E0 Webinar
Question

What will be the output of the following program :
#include<stdio.h>
void main()
{
float val=5.75;
int *ptr=&val;
printf("%.2f %.2f",*(float *)ptr,val);
}
Options:
A .  Compile Error
B .  5.75 5.75
C .  5.00 5.75
D .  None of these
Answer: Option B




Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers