网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

以下程序段的输出结果为().  char c[]="abc";  int  i=0;  do while(c[i++]!=’/0’);printf("%d",i-1);

  • A、abc
  • B、ab
  • C、2
  • D、3

参考答案

更多 “以下程序段的输出结果为().  char c[]="abc";  int  i=0;  do while(c[i++]!=’/0’);printf("%d",i-1);A、abcB、abC、2D、3” 相关考题
考题 有如下程序段:char C[20]="examination";C[4]=0;cout<<c<<endl;这个程序的输出结果是______。

考题 设已执行预编译命令include,以下程序段的输出结果是char s[]="an apple";printf("%d\ 设已执行预编译命令#include<string.h>,以下程序段的输出结果是 char s[]=" an apple" ; printf("%d\n",strlen(s));A.7B.8C.9D.10

考题 下列程序段的输出结果为()。includemain(){static char a[]="language";char*p;p=a;for 下列程序段的输出结果为( )。 #include<stdio.h> main() { static char a[]="language"; char*p; p=a; for(p=a;p<a+8;p+=2) putchar(*p); }A.1B.4C.9D.0

考题 若有以下程序段: include using namespace std; int main() {char*p="abcdefgh",*r;l 若有以下程序段:include <iostream>using namespace std;int main(){char*p="abcdefgh",*r;long*q;q=(long*)p;q++;r=(char*)q;cout<<r<<end1;return 0;}该程序的输出结果是【 】。

考题 下列程序段的输出结果为()。includemain(){ static char a[]="language";char *p;p=a;f 下列程序段的输出结果为( )。 #include<stdio.h> main() { static char a[]="language"; char *p; p=a; for(p=a;p<a+8;p+=2) putchar(*p); }A.languageB.lnugC.有语法错误D.lang

考题 以下程序的输出结果是【】。 includevoid main() {char *p= "12345678" , *r;long *q; 以下程序的输出结果是【 】。include<iostream. h>void main() {char *p= "12345678" , *r;long *q;q=(long *)p;q++;r= (char *) q:cout<<r;}

考题 以下C程序段的输出结果是(30)。 include void abc(char *str){ int a, b; 以下C程序段的输出结果是(30)。 #include <stdio. h> void abc(char *str){ int a, b; for(a=b=0;str[a]!='\O';a++)if(str[a]!='c') str[b++]=str[a]; str[b]='\O'; } void main(){ char str[]="abcdef"; abc(str); printf("str[]=%s",str); }A.str[]=aB.str[]=abC.str[]=abdefD.str[]=abcdef

考题 以下程序的输出结果是includevoid main( ){char x=040;cout 以下程序的输出结果是 #include<iostream.h> void main( ) { char x=040; cout < < (X < < 1) ;}A.100B.80C.64D.32

考题 以下程序的输出结果是()。includevoid func(char**m){++m:cout 以下程序的输出结果是( )。 #include<iostream.h> void func(char**m) { ++m: cout<<*m<<end1; } void main() { static char*a[]={"MORNING","AFTERTOON","EVENING"}; char**n: n=a; func(n); }A.为空B.MORNINGC.AFTERTOOND.EVENING

考题 以下程序的输出结果是()。includevoid func(char**m) {++m:cout 以下程序的输出结果是( )。 #include<iostream.h> void func(char**m) { ++m: cout<<*m<<endl; } void main() { static char*a[]={"MORNING","AFTERTOON","EVENING"}; char**n; n=a: func(n); }A.为空B.MORNINGC.AFTERTOOND.EVENING

考题 下列程序段的输出结果为()。includemain(){static char a[]="language"; char*p; p=a; 下列程序段的输出结果为( )。 #include<stdio.h> main() { static char a[]="language"; char*p; p=a; for(p=a;p<a+8;p+=2) putchar(*p); }A.languageB.lnugC.有语法错误D.lang

考题 以下程序段的输出结果为( )。 static char a[]="programme"; char*p; p=a; for(p=a;p<a+8;p+=2) putchar(*p);A.programmeB.pormC.有语法错误D.prog

考题 有以下程序段 main() { char a[7]="abcdef"; charb[4]="ABC"; strcpy(a,b) ; printf("%c",a[5]); } 程序段运行后的输出结果是( )A.aB.\0C.eD.f

考题 以下程序的输出结果为()。includemain(){ char *alpha[6]={"ABCDEFGH","IJKL","MNOP"," 以下程序的输出结果为( )。 #include<stdio.h> main() { char *alpha[6]={"ABCDEFGH","IJKL","MNOP","QRST","UVWX"}; char**p;int i; p=alpha; for(i=0;i<4;i++)printf(" %s" ,p[i]);printf("\n" );}A.ABCDEFGHIJKLB.ABCDC.ABCDEFGHIJKLMNOPQRSTD.AEIM

考题 以下程序的输出结果是【 】。includeincludechar*fun(char*0{ char *p--t;retur 以下程序的输出结果是【 】。include <stdio.h>include <string.h>char *fun(char *0{ char *p--t;return (p+strlen(t)/2);}main(){ char *str="abcdefgh";str=ftm(str);puts(str);}

考题 以下程序段的输出结果是()。includemain(){char p[][4]={"ABC","DEF","GHI"};int i;for 以下程序段的输出结果是( )。 #include<stdio.h> main() {char p[][4]={"ABC","DEF","GHI"}; int i; for(i=0;i<3;i++) puts(p[i]); }A.A B CB.A D GC.A B C D E F G H ID.A B C

考题 下列程序的输出结果为 include void main( ) { char * a[ ] ={"hello},"the"," wo 下列程序的输出结果为#include<iostream.h>void main( ){char * a[ ] ={"hello},"the"," world"};char * * pa=a;pa++;cout < < * pa < < endl;}A.helloB.theC.worldD.hellotheworld

考题 以下程序段的输出结果是 ______。includevoid main(){ char*p[5]={"ABCD","EF","GHI 以下程序段的输出结果是 ______。 #include<iostream.h> void main(){ char*p[5]={"ABCD","EF","GHI","JKL","MNOP"}; char **q=p; int i; for(i=0;i<=4;i++) cout<<q[i]; }A.ABCDEFGHIJKLB.ABCDC.ABCDEFGHIJKMNOPD.AEGJM

考题 以下程序的输出结果是()。includeincludeusing namespace std;void func(cha 以下程序的输出结果是( )。 #include<iostream> #include<stdlib> using namespace std; void func(char **m) { ++m; cout<<*m<<endl; } main() { static char *a[]={"MORNING","AFTERNOON","EVENING"); char **n; n=a; func(n); system("PAUSE"); return 0; }A.为空B.MORNINGC.AFTERNOOND.EVENING

考题 下列程序的输出结果为includevoid main( ){char * a[ ]={"hello","the","world"};c 下列程序的输出结果为 #include<iostream.h> void main( ) { char * a[ ]={"hello","the","world"}; char * * pa=a; pa++; cout <<*pa<<end1; }A.helloB.theC.worldD.hellotheworld

考题 下列程序的输出结果为includevoid main(){char*a[]={"hello","the","world"};char* 下列程序的输出结果为 #include<iostream.h> void main() { char*a[]={"hello","the","world"}; char**pa=a; pa++; cout<<*pa<<end1; }A.helloB.theC.worldD.hello the world

考题 设已执行预编译命令include,以下程序段的输出结果是()。char s[]="an apple";printf(" 设已执行预编译命令#include<string.h>,以下程序段的输出结果是( )。 char s[]=" an apple" ; printf(" %d\n" ,strlen(s));A.7B.8C.9D.10

考题 以下程序的输出结果是【 】。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);}

考题 以下程序段的输出结果是()。     char s[]= “\\140\140abc\t”;       prntf(“%d\n”,strlen(s));

考题 以下程序段的输出结果是()。      struct node         {int a;  float b;  char c[10];}  printf(“%d”,sizeof(struet node)) ;

考题 填空题以下程序段的输出结果是()。      struct node         {int a;  float b;  char c[10];}  printf(“%d”,sizeof(struet node)) ;

考题 填空题以下程序段的输出结果是()。    Char s[]I=”/1238/080abc”;    printf(”%d/n”,strlen(s));