Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Number
    {
    int n1;
    int n2;
    };
    void function(struct Number*);
    int main()
    {
    struct Number num1[] = {15, 25, 35, 45};
    function(num1);
    }
    void function(struct Number num2[])
    {
    printf("%d\n", num2->n1);
    }
    1. 15
    2. 25
    3. 35
    4. 45
    5. None of these
Correct Option: A

15



Your comments will be displayed only after manual approval.