Sail E0 Webinar
Question
What is the output of this C code?
typedef struct p
{
int x, y;
}k;
int main()
{
struct p p = {1, 2};
k k1 = p;
printf("%d\n", k1.x);
}
Options:
A .  Compile time error
B .  1
C .  0
D .  Depends on the standard
Answer: Option B


None.



Was this answer helpful ?
Next Question

Submit Solution

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

More Questions on This Topic :

Latest Videos

Latest Test Papers