Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Condition
    {
    int n1;
    char n2;
    };
    int main()
    {
    struct Condition con1[] = {11, 91, 31, 14, 15, 16};
    struct Condition *ptr1 = con1;
    int n1 = (sizeof(con1) / sizeof(ptr1));
    if (n1 == 1)
    printf("%d\n", ptr1->n1);
    else
    printf("False\n");
    }
    1. False
    2. Compilation Error
    3. Garbage value
    4. Nothing
    5. None of these
Correct Option: A

False



Your comments will be displayed only after manual approval.