take a look at this :
char* s;
scanf("%s", s);
In general, s is a "memory box" that will contain an address to another one which, in this case, would be the first of a number of "memory boxes" containing chars before the "\0" marking the end of the string.
*s would let us access the "memory boxes", i.e the string.
Now back to the code and precisely scanf, I read it as follows : Take the user input, which is a string hence the "%s", and assign it to s. But how can this be? s is the reference, so shouldn't it be scanf("%s", *s)
instead ?