网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有以下程序
#include <stdio.h>
#include <string.h>
main()
{ char a[10]="abcd";
printf("%d,%d\n",strlen(a),sizeof(a));
}
程序运行后的输出结果是
A)7,4
B)4,10
C)8,8
D)10,10
参考答案
更多 “ 有以下程序#include stdio.h#include string.hmain(){ char a[10]="abcd";printf("%d,%d\n",strlen(a),sizeof(a));}程序运行后的输出结果是A)7,4B)4,10C)8,8D)10,10 ” 相关考题
考题
有以下程序:includevoid fun(char**p){++P;printf("%s\n",*p);}main()char*a[]={"Morn
有以下程序: #include<stdio.h> void fun(char**p) { ++P;printf("%s\n",*p);} main() char*a[]={"Morning","Afternoon","Evening","Night"}; fun(A); } 程序的运行结果是( )。A.AfternoonB.fternoonC.MorningD.oring
考题
以下程序输出的结果是includeincludemain(){ char w[][10]={"ABCD","EFGH"
以下程序输出的结果是 #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 KLB.ABC EFG U MC.EFG JK OD.FGH KL
考题
有以下程序includemain(){char*a[]={"abcd","ef","gh","ijk"};int i; for(i=0;i
有以下程序 #include<stdio.h> main() { char*a[]={"abcd","ef","gh","ijk"}; int i; for(i=0;i<4;i++) printf("%c",*a[i]); } 程序运行后的输出结果是______。A.ageiB.dfhkC.abcdD.abcdefghijk
考题
有以下程序includemain(){int a=5,b=lt; t=(a
有以下程序 #include<stdio.h> main() { int a=5,b=lt; t=(a<<2)|b;printf("%d\n",t); } 程序运行后的输出结果是______。A.21B.11C.6D.1
考题
有以下程序: #include 〈iostream〉 using namespace std; #define M 10 #define B4 void setstar(char *a, int n) { int i; for (i=0; iA.AB C D E F G H I JB.AB C D * * * * * *C.AB C D E F * * * *D.* * * * * * A B C D
考题
以下程序:includeincludemain(){char str[]="abcd\n\123\xab";printf("%d"
以下程序: #include<stdio.h> #include<string.h> main() {char str[]="abcd\n\123\xab"; printf("%d",(str)); } 运行后的输出结果是( )。A.10B.9C.7D.14
考题
下面程序的运行结果是 ( ) include include main( ) { char * a="
下面程序的运行结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char * a="AbcdEf",* b="aBcD" a + +;b + +; printf("%d\n",strcmp(a,b)); }A.0B.负数C.正数D.无确定值
考题
有以下程序include.main(){char*p="abcde\ofghjik\0";printf("%d\n",strlen(p));} 程
有以下程序 #include.<string.h> main() { char *p="abcde\ofghjik\0"; printf("%d\n",strlen(p)); } 程序运行后的输出结果是A.12B.15C.6D.5
考题
有以下程序:include include main(){char *p[10]={"abc","aabdfg","dcdbe"
有以下程序: #include <stdio.h> #include <string.h> main() { char *p[10]={"abc","aabdfg","dcdbe","abbd","cd"}; printf("%d\n",strlen(p[4])); } 执行后的输出结果是( )。A.2B.3C.4D.5
考题
以下程序的输出结果是【 】。includeincludechar*fun(char*t){ char *p=t;retur
以下程序的输出结果是【 】。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);}
热门标签
最新试卷