Q:

what will be the output of the following program?

0

what will be the output of the following program?

int main()
{
int i = 97, *p = &i;
foo(&p);
printf("%d ", *p);
return 0;
}
void foo(int **p)
{
int j = 2;
*p = &j;
printf("%d ", **p);
}

  1. 2 97
  2. 2 2
  3. Compilation Error
  4. Segment Fault

All Answers

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

Correct Answer:

2 2

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

total answers (1)

Similar questions


need a help?


find thousands of online teachers now
what will be the output of the following program... >>
<< what will be the output of the following program...