in Programming retagged by
2,217 views
0 votes
0 votes

What is the output of this C code? Please explain what is happening at line no. 12

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = 97, *p = &i;
  5.         foo(&p);
  6.         printf("%d ", *p);
  7.         return 0;
  8.     }
  9.     void foo(int **p)
  10.     {
  11.         int j = 2;
  12.         *p = &j;
  13.         printf("%d ", **p);
  14.     }
in Programming retagged by
2.2k views

1 comment

can any1 please explain this ?

o/p is : 2 2
0
0

Please log in or register to answer this question.

Related questions