Question PRG-C-0007
EasyWhat is the output of this program?
#include <stdio.h>
int main(void) {
int x = 10;
int *p = &x;
printf("%d", *p);
return 0;
}
- A.
Error
- B.
20
- C.
Show answer and explanation
Answer: C
p points to x, so *p reads x's value, 10.