Q:

Pick out the output

0

Pick out the output

#include <stdio.h>
    int main()
    {
        foo(ary);
    }
    void foo(int **ary)
    {
        int i = 10, k = 10, j = 2;
        int *ary[2];
        ary[0] = &i;
        ary[1] = &j;
        printf("%d\n", ary[0][1]);
    }

  1. compile time error
  2. Runtime error
  3. Output : 20
  4. Undefined Behaviour

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

Undefined Behaviour

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Point the correct statement... >>
<< Are the expressions arr and &arr same for an array...