Home » C Programming » Structures » Question
  1. Can the following C code be compiled successfully?
    #include <stdio.h>
    struct A
    {
    int p;
    char q;
    float r;
    };
    int main()
    {
    struct A t = {.q = 15, .r = 13, .p = 23};
    printf("%f\n", t.r);
    }
    1. Depends on the standard
    2. No
    3. Depends on the platform
    4. Yes
    5. None of these
Correct Option: D

Yes



Your comments will be displayed only after manual approval.