关于C语言中,数组输入元素问题。
#include <stdio.h>
#include <string.h>
int main(){
char s[5];
int i,k,n;
k=strlen(s);
printf("Please input a string :\n");
for(i=0;i<5;i++)
{
scanf("%c",&s[i]);
}
printf("The input string is: %s\n",s);
问题:在scanf("%c",&s[i])中,如果把%c换成%s,那么之后的参数是不是应该换成&s ? 可不可以在C语言中,输入一个字符串作为scanf的参数? 如果可以的话,麻烦牛人指导