Examveda

What will be the output of the following C code?
#include <stdio.h>
typedef struct p
{
    int x, y;
}k;
int main()
{
    struct p p = {1, 2};
    k k1 = p;
    printf("%d\n", k1.x);
}

A. Compile time error

B. 1

C. 0

D. Depends on the standard

Answer: Option B


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union