Can the following C code be compiled successfully? [code] #include <stdio.h> struct p { int k; char c;

Can the following C code be compiled successfully?
Code:
    #include <stdio.h>
    struct p
    {
        int k;
        char c;
        float f;
    };
    int main()
    {
        struct p x = {.c = 97, .f = 3, .k = 1};
        printf("%f\n", x.f);
    }
A. Yes
B. No
C. Depends on the standard
D. Depends on the platform
 

Tìm kiếm

Back
Top