Sail E0 Webinar
Question

What will be output if you compile following c code ?


#include<stdio.h>
struct
{
int i;
float f;
};
void main()
{
int i=5;
float f=9.76723;
printf("%d %.2f",i,f);
}


Options:
A .  Compile Error
B .  5 9.76723
C .  5 9.76
D .  5 9.77
Answer: Option D

Both <struct type name> and <structure variables> are optional. Thus the structure
defined in the above program has no use and program executes in the normal way.



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers