阅读下列程序,则在执行后,程序的运行结果为
#include "stdio.h"
#include "string.h"
main()
{ char a[30]="nice to meet you!";
strcpy(a+strlen(a)/2,"you");
printf("%s\n",a);}
A.nice to meet you you
B.nice to
C.meet you you
D.nice to you
第1题:
当执行下面的程序时,如果输入ABC,写出程序输出结果 #include "stdio.h" #include "string.h" main() { char ss[10]; gets(ss); strcat(ss,"6789"); printf("%sn",ss); }
第2题:
3、阅读下列程序,则在执行后,程序的运行结果为() #include <string.h> #include<stdio.h> int main() { char a[30]="nice to meet you!"; strcpy(a+strlen(a)/2,"you"); printf("%s\n",a); }
A.nice to meet you you
B.nice to
C.meet you you
D.nice to you
第3题:
21、以下程序执行后的结果为 。 #include "stdio.h" #include <string.h> void fun(char *s) { char a[10]; strcpy(a,"string"); s=a; } main() { char *p="gao"; fun(p); printf("%s\n",p); }
A.gao
B.结果不确定
C.str
D.string
第4题:
分析下面程序的运行结果()。 #include "stdio.h" #include "string.h" main() { printf("%dn",strlen("IBMn012")); }
第5题:
已知字符B的ACSII码值为66,下面程序的执行结果是: #include<stdio.h> main() { char ch=’A’; printf(“%c %dn”,ch,ch); }