Examveda

What will be the output of the following C code?
#include <stdio.h>
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


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union