The problem is that you said:
char * str
Str itself has no unit for storing strings. You either initialize, give it storage units, or dynamically allocate units. Or just use it as a pointer.
If so:
char a[ 100]; char * strstr = & ampa[0]; scanf("%s ",str);
That's no problem.
VC is strict.