摘要: ---------首先我们看一下scanf()读取字符串的问题:程序2:#include int main(){char str1[20], str2[20];scanf("%s",str1);printf("%s\n",str1);scanf("%s",str2);printf("%s\n",str2);return 0;} 程序的功能是读入一个字符串输出,再读入一个字符串输出。可我们会发现输入的字符串中不能出现空格,例如:测试一:Hello world!输出:Helloworld!【分析】 到此程序执行完毕,不 阅读全文
posted @ 2013-12-19 18:22 galaxy77 阅读(322) 评论(0) 推荐(0) 编辑