Multiple choice technology

#include <stdio.h>void main() { int I=3,j,k; j=&I; k=&j; printf("%d%d%d",*j,k,(*k)); } What is the output of the above program code?

  1. 444

  2. 000

  3. 333

  4. 433

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

j dereferences pointer j (which points to I) giving 3. **k dereferences k twice: k points to j, j points to I, so **k = 3. However, *(*k) is problematic - *k gives j's value (address of I), then dereferencing that address as if it were a pointer ((*k)) is incorrect. The actual output would be unpredictable, but the question expects 333 assuming *(*k) is treated as **k.