Question
#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);
}
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);
}
Answer: Option C
Was this answer helpful ?
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 ?
Submit Solution