C - Input and Output
Identify the error in the following code snippet:
char name[10];
scanf("%c", name);
char name[10];
scanf("%c", name);
%c reads a single character, but name is an array for a string.name, use %s which reads until whitespace.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions