+ 1
How to input a string using scanf() in C ?
How to input a string of n characters using scanf()?
2 Respuestas
+ 3
Maybe your answer is here
https://www.sololearn.com/Discuss/1465754/?ref=app
+ 1
1- Declare your string variable.
2- In scanf(), use %s as your format specifier.
3- When assigning the format specifier to a variable, don't use '&' (according to my experience, adding & never worked.)
Example:
char str[10];
scanf("%s",str);
Hope this helps :)