Examveda

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

A. Compile time error

B. 1

C. 0

D. Depends on the standard

Answer: Option A


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union