为什么字符型数组输入用%c占位符会出错,而用%s就可以正常运行? 拉阿拉蕾 2022-09-24 101 阅读1分钟 #include <stdio.h> int main() { int couple; char M[1000]; scanf("%d", &couple); //scanf("%s", &M[0]); 为什么这里用%s才能保证输入的数据赋值给M[0] scanf("%c", &M[0]); printf("%c\n", M[0]); return 0; }