• 2021-04-14
    #include#includevoidmain(){chara[20],b[20];strcpy(a,"apple");strcpy(b,a);strcpy(a,"OK");puts(a);}(5.0分)
  • OK

    内容

    • 0

      29.有以下程序(strcpy为字符串复制函数,strcat为字符串连接函数) #include #include main() { char a[10]="abc",b[10]="012",c[10]="xyz"; strcpy(a+1,b+2); puts(strcat(a,c+1));} 程序运行后的输出结果是

    • 1

      使用库函数前包含头文件stdio。h的正确命令是( )。 A: @include<stdio.h> B: #include<stdio.h> C: #include stdio.h D: #include”stdio.h”

    • 2

      下段代码的运行结果是: intmain() { chara; char*str=&a; strcpy(str,"hello"); puts(str); return0; }

    • 3

      char s[80],*sp="HELLO!";sp=strcpy(s,sp);s[0]='h';puts(sp);运行结果:________

    • 4

      如果程序中用到标准库函数sqrt( )和strcmp( ),那么该程序应含下面哪两条语句( ) A: B: include “stdio.h” C: include “math.h” D: E: include “math.h” F: incluede “string.h” G: H: include “string.h” I: include “stdio.h” J: K: include “stdlib.h” L: include ”math.h”