ProgrammingModerate

int n = 3; int *p = &n; printf("%d", *p * *p + *p); What is printed?

  1. A. 9
  2. B. 15
  3. C. 12
  4. D. 6

Correct answer: C. 12

The expression is 3 * 3 + 3 = 12, with both dereferences giving n.

More C Programming questions

Exams that ask this topic