Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
     #include &l;stdio.h>
    struct Price
    {
    int m;
    int n;
    };
    void fun(struct Price*);
    int main()
    {
    struct Price p1[] = {105, 210, 310, 49, 59};
    fun(p1);
    }
    void fun(struct Price p[])
    {
    printf("%d %d\n", p->m, p[3].n);
    }
    1. Garbage value
    2. Compilation Error
    3. 105 0
    4. Nothing
    5. None of these
Correct Option: C

105 0



Your comments will be displayed only after manual approval.