C - Structures,Unions - Discussion

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

 



Q.

What is the output of this C code?

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

A. Compile time error B. 10 10
C. Depends on the standard D. Depends on the compiler

Answer: Option B
Explaination:

No Explanation



Discussion

Your Comments Goes here...
NameDiscussion