You need to go back a few steps and re-read your notes on pointers and memory:
char* c;
Creates a pointer to a character called
c
, but doesn't give it a value.
scanf("%s",c);
Tries to read a string into the memory that
c
points to.
But since you haven't pointed
c
at anything, your app fails.
Think of it like this: you stop and ask a stranger for directions. He stands there unmoving and tells you to go "That way, then take the first junction on that side, then the second of this side, then go in that direction for about two miles and take another turning".
Unless he indicates left, right, north, south and so on, his directions are no use to you because his pointers are all missing. If he points "left, then right, then right, north, left" while he says it the directions mean something - but empty pointers are of no use to anyone!
Create an area of memory (either by creating an array of characters, or by using malloc) and assign
c
to the start of it. Then your code will start to work!