Examveda

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

A. Compile time error

B. 0.000000 10

C. Somegarbage value 10

D. 0 10

Answer: Option B


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union