若有定义:char s[30] = {0};运行时输入:This is a string.<回车>则以下不能正确读入整个字符串:This is a string. 到字符数组 s 中的语句组是( )。
A)scanf("%s", s);
B)gets(s);
C)for (i=0; (c=getchar())!= ’\n’; i++)s[i] = c;
D)i = 0; while ((c=getchar())!=’\n’)s[i++] = c;
A 撒,a这个只能输入没有空格的字符串
点赞
扫一扫分享朋友圈
二维码
分享
你确定要删除这个问题吗?