Examveda

What will be the output of the following C code?
#include <stdio.h>
struct
{
    int k;
    char c;
};
int main()
{
    struct p;
    p.k = 10;
    printf("%d\n", p.k);
}

A. Compile time error

B. 10

C. Undefined behaviour

D. Segmentation fault

Answer: Option A


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union