以下程序(程序左边的数字为附加的行号)______。 1#include<str.h> 2#include<stdio.h> 3main() 4{ char s[]="string"; 5puts(s); 6strcp

admin2009-04-15  18

问题 以下程序(程序左边的数字为附加的行号)______。    1#include<str.h>    2#include<stdio.h>    3main()    4{  char s[]="string";    5puts(s);    6strcpy(s,"hello");    7printf("%3s\n",s);}

选项 A、没有错
B、第1行有错
C、第6行有错
D、第7行有错

答案2

解析 字符串复制函数strcpy包含在头文件string.h中,因此,程序中的第1行文件包含命令是错误的。
转载请注明原文地址:https://kaotiyun.com/show/nZXp777K
0

随机试题
最新回复(0)