首页/ 题库 / [多选题]

写出程序的运行结果。

写出程序的运行结果。

      

#include <stdio.h>

      main彩蛋

      {  int i=0,j=0,k=0,m;

         for ( m=0;m<4;m++ )

            switch ( m )

            {   case 0:i=m++;

                case 1:j=m++;

                case 2:k=m++;

                case 3:m++;

            }

           printf ("\n%d,%d,%d,%d",i,j,k,m);

        }

该程序的执行结果是______。

多选题
2021-07-17 19:51
、 0,1,1,3
、0,1,2,3
、0,1,2,4
、0,1,2,5
查看答案

正确答案
0,1,2,5

试题解析

标签:
感兴趣题目
下列程序的执行结果为( )。 #include<iostream.h> void main { int a=3,b=0; int*P =&a; b=+a++; cout<<*P<<”,”<<b<<endl; }
下面程序输出的结果为( )。 #include"iostream.h" classA {public: A(){cOUt<<"CLASSA"<<endl;} ~A(){}}; ClaSSB:publicA {public: B(){cout<<"CLASSB"<<endl;} ~B(){}}; voidmain() {A*P; P=newB: B*q: q=newB;}
若有如下程序: #include<iostream> usingnamespaeestd; classTestClass { public: voidwho(){cout<<"TestClass"<<endl;} }; classTestClassl:publicTestClass { public: voidwho(){cout<<"TestClassl"<<endl;}}; intmain() { TestClass*P; TestClasslobj1; p=&obj1; p->who(); retum0; } 则该程序运行后的输出结果是( )。
下列程序的输出结果是( )。 #include<stdio.h> main { int a[2][3]={{1,2,3),{4,5,6)),(*p)[3],i; p=a ; for(i=0;i<3;i++) { if(i<2) p[1][i]=p[1][i]-1; else p[1][i]=1; } printf("%d\n",a[o][1]+a[1][1]+a[1][2]); }
下述程序的输出结果是( )。 #include<stdio.h> main { int a[2][3]={{1,2,3),{4,5,6}},(*p)[3],i; p=a ; for(i=0;i<3;i++) { if(i<2) p[1][i]=p[1][i]一1; else p[1][i]=1;) printf("%d\n",a[0][1]+a[1][1]+a[1][2]);}
有以下程序:include <stdio.h> main( ) { int a=7,b=8,* p,*q, *r; p=&a;q=&b; r=p; p=q;q=r; printf(" % d,% d,% d,% d ", * p, * q.a,b);程序运行后的输出结果是()。
有以下程序: #include <stdio.h> main( ) { char s[ ] ="159" , * p; p=s; printf( "% c", * p + + ); printf("%~", * p++);}程序运行后的输出结果是( )。
有以下程序: #include<stdio.h> main() { int a[]={1,2,3,4},y,*p=&a[3]; --p;y=*p;printf("y=%d ",y); } 程序的运行结果是( )。
下面程序段的运行结果是char a[]="lanuage",*p;p=a;while(*p!=′u′){printf("%c",*p-32);p++;}
下面程序段的运行结果是char a[ ]="lanuage",*p;p=a;while(*p!='u'){printf("%c",*p-32);p++;}
下面的程序中,错误的语句是( )。 ①#inClude<iostream.h> ②void main ③{ ④ int *p=new int[1]; ⑧P=9; ⑥cout<<.*P<<endl; ⑦delete[]p; ⑧}
有以下程序: #include <stdio.h> #include <string.h> main() { char str[][20]={"Hello","Beijing"},*P=str[0]; printf("%d ",strlen(p+20)); } 程序运行后的输出结果是( )。
相关题目

写出程序的运行结果。

        #include  <stdio.h>

        main彩蛋

        {  int a, b;

           scanf ( ”%d%d", &a, &b);

           if ( ++a >= b )  printf( ”Yes”);

           printf ( " a+b =%d\n", a+b );

        }

       如果输入:a=6,b=8,则输出结果是___________。

写出程序的运行结果。

        #include  <stdio.h>

        main彩蛋

        {  int a, b;

           scanf ( ”%d%d", &a, &b);

           if ( ++a >= b )  printf( ”Yes”);

           printf ( " a+b =%d\n", a+b );

        }

       如果输入:a=6,b=8,则输出结果是___________。

写出程序的运行结果。

        #include  <stdio.h>

        main彩蛋

        {  int a, b;

           scanf ( ”%d%d", &a, &b);

           if ( ++a >= b )  printf( ”Yes”);

           printf ( " a+b =%d\n", a+b );

        }

       如果输入:a=6,b=8,则输出结果是___________。

写出程序的运行结果。

        #include  <stdio.h>

        main彩蛋

        {  int a, b;

           scanf ( ”%d%d", &a, &b);

           if ( ++a >= b )  printf( ”Yes”);

           printf ( " a+b =%d\n", a+b );

        }

       如果输入:a=6,b=8,则输出结果是___________。

写出程序的运行结果。

      

#include <stdio.h>

      main彩蛋

      {  int i=0,j=0,k=0,m;

         for ( m=0;m<4;m++ )

            switch ( m )

            {   case 0:i=m++;

                case 1:j=m++;

                case 2:k=m++;

                case 3:m++;

            }

           printf ("\n%d,%d,%d,%d",i,j,k,m);

        }

该程序的执行结果是______。

有以下程序:

main()

{int aa[5][5]={{1,2,3,4},{5,6,1,8},{5,9,10,2},{1,2,5,6}};

int s=0,i;

for(i=0;i<4;i++)

s+=aa[i][2];

printf("%d",s);

}

程序运行后的输出结果是(  )。

若变量已正确定义,下面程序段的输出结果是(  )。

#include<stdio.h>

main()

{float x=1.236547;

printf("%f\n",(int)(x*1000+0.5)/(float)1000);

}

有以下程序:

main()

{int i,t[][3]={9,8,7,6,5,4,3,2,1};

for(i=0;i<3;i++) printf("%d",t[2-i][i]);

}

程序执行后的输出结果是( )。

若变量已正确定义,下面程序段的输出结果是(  )。

#include<stdio.h>

main()

{float x=1.236547;

printf("%f\\n",(int)(x*1000+0.5)/(float)1000);

}

有如下程序: <br>#include<br>using namespace std;<br>int main()<br>{<br>int *p;<br>*p =9;<br>cout&lt;&lt;"The value at p:"&lt;&lt;*p;<br>return 0;<br>}<br> 编译运行程序将出现的情况是 <br>
有以下程序: #include<string.h> main() { char str[][20]={"Hello","Beijing"),*p=str[0]; printf("%d ",strlen(p+20)); } 程序运行后的输出结果是( )。
有以下程序: #include < stdio. h > main( ) { ehar str[ ] [10] = { "China" ," Beijing" } , * p = str[o]; printf( "% s ", p + 10); }程序运行后的输出结果是( )。
有以下程序: mam() { char s[]="ABCD",*p; for( p=s+1;p<s+4;p++)printf("%s ",p); } 程序运行后的输出结果是( )。
有以下程序 main() { char s[]="ABCD", *p; for( p=s+1;p<s+4;p++) printf("%s ",p); } 程序运行后的输出结果是
有以下程序 main() { char s[]="ABCD",*p; for(p=s+1;p<s+4;p++)printf("%s ",p); } 程序运行后的输出结果是
有以下程序main( ){ char s[ ]="ABCD",*p;for(p=s+1;p<s+4;p++)printf("%s\n",p);}程序运行后的输出结果是
有以下程序: #include<stdio.h> void fun(char**p) { ++P;printf("%s ",*p);} main() char*a[]={"Morning","Afternoon","Evening","Night"}; fun(A); } 程序的运行结果是( )。
有以下程序 #include<stdio.h> void fun(char**p) {++p;printf("%s",*p);} main {char*a[]={"Morning","Afternoon","Evening"," Night"); fun(a); } 程序的运行结果是( )。
有以下程序#include <stdio.h>void fun(char **p){ p=p+2; printf("%s\n",*p);}main(){ char *a[]={"Morning","Afternoon","Evening","Night"}; fun(a);}程序的运行结果是A.rningB.afternoonC.ternoon D.Evening

写出程序的运行结果。

        #include  <stdio.h>

        main

        {  int a, b;

           scanf ( ”%d%d", &a, &b);

           if ( ++a >= b )  printf( ”Yes”);

           printf ( " a+b =%d\n", a+b );

        }

       如果输入:a=6,b=8,则输出结果是___________。

广告位招租WX:84302438

免费的网站请分享给朋友吧