以下程序输出的结果是 #include<stdio.h> #include<string.h> main() { char w[][10]={"ABCD","EFGH","IJKL","MNOP"},k; for(k=1;k<3;k++) printf("%s\n",&w[k][k]);}
A.ABCD FGH KL
B.ABC EFG U M
C.EFG JK O
D.FGH KL
第1题:
有以下程序: #include <stdio.h> #include <string.h> main() { char *p[10]={"abc","aabdfg","dcdbe","abbd","cd"}; printf("%d\n",strlen(p[4])); } 执行后的输出结果是( )。
A.2
B.3
C.4
D.5
第2题:
当执行下面程序且输入"ABC"时,则输出的结果是()。 #include <stdio.h> #include <string.h> main() { char a[10]="12345"; strcat(a,"6789"); gets(a); printf("%s",a); }
A.ABC
B.ABC9
C.123456ABC
D.ABC456789
第3题:
13、当执行下面程序且输入"ABC"时,则输出的结果是()。 #include <stdio.h> #include <string.h> main() { char a[10]="12345"; strcat(a,"6789"); gets(a); printf("%s",a); }
A.ABC
B.ABC9
C.123456ABC
D.ABC456789
第4题:
以下程序的输出结果是【 】。
include <stdio.h>
include <string.h>
char *fun(char *t)
{ char *p=t;
return (p+strlen(t)/2);
}
main()
{ char *str="abcdefgh";
str=ftm(str);
puts(str);
}
第5题:
以下程序运行后的输出结果是() 。 #include <stdio.h> #include <stdlib.h> #include <string.h> main() { char *p; int i; p=(char *)malloc(sizeof(char)*20); strcpy(p,"welcome"); for(i=6;i>=0;i--) putchar(*(p+i)); printf("n"); free(p); }