下面程序段的输出结果为【 】.char s1[30]="SHANGHAI",s2[30]="JINAN";printf("%d",strcmp(strcpy(s1,s2),s2));
举一反三
- 执行下面程序段后,输出的结果是__. char s1[50] = {"some string *"},s2[] = {"test"}; printf("%s ",starcat(s1,s2));
- char s1[ ] = "hello ";char s2[ ] = "tangx ";strcpy(s1, s2);printf("%s\n", s1);以上代码段执行结果为哪个选项? A: hello tangx B: tangx hello C: hello D: tangx
- 设有定义:char s1[ ]= "abc",s2[ ]= "mnop";,则执行语句strcpy(s2,s1);printf("%s", s2);后,输出的结果是______。 A: mnop B: abc C: mnopabc D: abcmnop
- 下列程序段运行后输出( )char s1[5],s2[ ]=”enjoy”;s1=s2;printf("%s",s1); A: enjoy B: joy C: en D: 编辑出错
- 以下程序的输出结果是( )#include ”string.h”main(){ char s1[20]=“bcd”,s2[20]=“abc”;if(strcmp(s1,s2)>0) printf(“%s\n”,s1);else printf(“%s\n”,s2);} A: bcd B: abc C: bcdabc D: abcbcd