Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Cricket_Team
    {
    int A;
    int B;
    } t[] = {150, 250, 350, 450, 550};
    void function(struct Cricket_Team*);
    int main()
    {
    function(t);
    }
    void function(struct Cricket_Team t[])
    {
    printf("%d %d\n", t->A, t[2].B);
    }
    1. Compilation Error
    2. Garbage value
    3. Undefined behaviour
    4. 150 0
    5. None of these
Correct Option: D

150 0



Your comments will be displayed only after manual approval.