The following code works but why do I have to use 'x' instead of '&x' inside scanf()?
```
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char *x = malloc(sizeof(char) * 50);
printf("Enter your name: ");
if (x) {
scanf("%s", x); // &x returns an EM
printf("Name: %s\n", x);
}
free(x);
}
```
If I use '&x' I get an EM: format specifies type 'char *' but the argument has type 'char' ** [-Werror,-Wformat]. What does that EM mean?
Googling I have found that char** is a pointer to a pointer. so x is a pointer and '&x' is a pointer to a pointer? Is '&x' the memory address of the pointer and not the address of the value that the pointer is going to point to? In examples I do see & in scanf and well, I am confused.
I feel rather silly but it is bugging me.