ProgrammingModerateTCS NQT · Infosys

int x = 2; int *p = &x; *p = *p * *p; What is x?

  1. A. 2
  2. B. 4
  3. C. 8
  4. D. 16

Correct answer: B. 4

*p * *p is 4, and the assignment stores 4 in x through the pointer.

More C Programming questions

Exams that ask this topic