What is the output of the following C program?
#include <stdio.h>
int main(void) {
int x = 10;
int *p = &x;
*p = 20;
printf("%d %d\n", x, *p);
return 0;
}
p holds the address of x, so *p = 20 writes 20 into x itself. Both x and *p read the same memory.