更多“下面程序的输出结果是() void main() { int a,b,c,s; a=10;b=3;c=11; if(a>9) s=(a--+c)%b+2; else cout<<c;>”相关的问题
第1题
有以下程序: void swap1(int *a,int *b) {int *c=a; s=b,b=c; } void swap2(int *a.int *b) { int c=*a; *a=*b,*b=c; } main() {int a=10, b=15; swap 1(&a,&b) ; printf("%d,%d,",a,b) ; a=10,b=15; swap2(&a,&b) ; printf("%d,%d",a,b) ; } 其输出结果为______。
A.15,10,10,15
B.15,10,15,10
C.10,15,10,15
D.10,15,15,10
点击查看答案
第2题
[图]A、1011001B、1011010C、1011100D、1011101...
A、1011001
B、1011010
C、1011100
D、1011101
点击查看答案
第3题
以下程序段的输出结果是。 int a=10,b=50,c=30; if();
A.a=10 b=50 c=10
B.a=10 b=30 c=10
C.a=50 b=30 c=10
D.a=50 b=30 c=50
点击查看答案
第4题
请将如下程序补充完整,使得输出结果为:bbaa。
include<iostream>
using naluespace std;
class A{
public:
______{eout<<"aa";}
};
class B:public A{
public:
~B(){eont<<"bb";}
};
int ulain(){
B*P=new B;
delete P;
return 0;
}
点击查看答案
第5题
下面程序的运行结果是( )。 int a=1,b=10; do { b-=a; a++; } while (b-->2); printf (“a=%d,b=%d\n”,a,b);
A、a=4,b=2
B、a=4,b=1
C、a=3,b=2
D、a=3,b=1;
点击查看答案
第6题
int a = 10; int b = a++; b的结果是();
A.11, 10
B.10,11
C.11,11
D.10,10
点击查看答案
第7题
以下程序的运行结果是 int main() { int a=3,b=4,c=5,t=99; if(b <a&&a> <c) { t="b,b=a,a=t;" } printf("%d\n",a);>
点击查看答案
第8题
运行以下代码: class PassS{ public static void main(String[] args){ PassS p=new PassS( ); p.start( ); } void start( ){ String s1=”slip”; String s2=fix(s1); System.out.println(s1+” ”+s2); } String fix(String s1){ s1=s1+”stream”; System.out.print(s1+” ”); return “stream”; } } 运行结果是( )。
A、slip stream
B、slipstream stream
C、stream slip stream
D、slipstream slip stream
点击查看答案
第9题
以下程序段中的变量已正确定义 for(i=0;i<4;i++,i++) for(k="l;k<3;k++);" printf("*"); 程序段的输出结果是(> A、********
点击查看答案
第10题
void main() { int a=l,b=2; while(a<6) {b+="a;" a+="2;" b%="10;}" printf("%d,%d\n",a,b); }> A、5,11
点击查看答案