Sail E0 Webinar
Question

What will be output if you compile following c code ?


#include<stdio.h>
typedef struct
{
int i;
float f;
}values;
void main()
{
static values var={555,67.05501};
printf("%2d %.2f",var.i,var.f);
}


Options:
A .  Compile Error
B .  55 67.05
C .  555 67.06
D .  555 67.05
Answer: Option C

In the above program, values is the user-defined structure type or the new user-defined data type. Structure  variables can then be defined in terms of the new data type.



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers