Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Team
    {
    int a;
    int b;
    };
    void function(struct Team*);
    int main()
    {
    struct Team t1[] = {100, 200, 300, 400};
    function(t1);
    }
    void function(struct Team t2[])
    {
    printf("%d %d\n", t2->a, ++t2->a);
    }
    1. 100 200
    2. 300 400
    3. 101 101
    4. Garbage value
    5. None of these
Correct Option: C

101 101



Your comments will be displayed only after manual approval.