C - Structures,Unions - Discussion

You Are Here :: Home > C > Structures,Unions - Discussion

 



Q.

What is the output of this C code(according to C99 standard)?

#include
struct p
{
int k;
char c;
float f;
};
int main()
{
struct p x = {.c = 97};
printf("%f\n", x.f);
}

A. 0.000000 B. Somegarbagevalue
C. Compile time error D. None of the mentioned

Answer: Option A
Explaination:

No Explanation



Discussion

Your Comments Goes here...
NameDiscussion