The program below has a problem. Which statement correctly describes it?
#include <stdio.h>
int main(void) {
int x = 10;
int *p = x;
printf("%d\n", *p);
return 0;
}
x is an int value, not an address. Modern compilers reject int *p = x; (an int-to-pointer conversion). Write int *p = &x;, and then *p is 10.