Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    struct output
    {
    int n1;
    int n2;
    };
    int main()
    {
    struct output out[] = {11, 21, 13, 41, 15, 61};
    struct output *ptr1 = out;
    printf("%d %d\n", ptr1->n1, (ptr1 + 2)->n1);
    }
    1. Compilation Error
    2. 11 21
    3. 13 41
    4. 11 15
    5. None of these
Correct Option: D

11 15



Your comments will be displayed only after manual approval.