edited by
1,593 views
0 votes
0 votes

Consider the following C-fragment:

#include<stdio.h>
int(*foo())[3]
{
  int a[3]={1,2,3};
  printf("%d",*a);
  return &a;
}
 
int main()
{
  int (*p)[3];
  p==foo();
  printf("%d",*(*p+2));
  return 0;
}


$A)13$        $B)10$        $C)31$        $D)Compilation$ $error$

edited by

Please log in or register to answer this question.