下列程序的执行结果为()。include<iostream.h>void main{int a=3,b=0;int*P =&a;b=+a+
下列程序的执行结果为()。
include<iostream.h>
void main
{
int a=3,b=0;
int*P =&a;
b=+a++;
cout<<*P<<”,”<<b<<endl;
}
A.3,4
B.4,3
C.3,4
D.4,4
时间:2023-08-16 13:24:28
相似题目
-
写出程序的运行结果。 #include <stdio.h> main() { int j; for(j=0;j<10;j++) {if (j%2==0) continue; printf("%d",j); } } 该程序的执行结果是()。
A . 0 4 2 6 8
B . 1 3 5 7
C . 1 3 5 7 9
D . 2 4 6 8
-
有如下程序:#include int main(void){int x=23;do{printf(%d,x--);}while(!x);return 0;}该程序的执行结果是( )。
-
阅读下列程序,则在执行后,程序的运行结果为( ).#include stdio.h#include string.hmain( ){ char a[30]=nice to meet you!
-
有下列程序 #include void main() { int a=0,b=0,c=0; if (++a || ++b && ++c) printf('%d,%d,%d', a, b, c); } 程序执行后的输出结果是________。
-
有以下程序: include <stdio.h> void f(); } 执行后的输出结果【 】。
-
下述程序执行的输出结果是()。 include<stdio.h> main() {char a[2][4]; , strcpy(
下述程序执行的输出结果是()。 include<stdio.h> main() {char a[2][4]; , strcpy(a。"are");strcpy(a[1],"you"); a[o][3]=&; printf("%s\n",a); }
A.are&you
B.you
C.are
D.&
-
下列程序的执行结果是______。include<stdio.h>union un{int i; char c[2};};void main(){union
下列程序的执行结果是______。 include<stdio.h> union un { int i; char c[2}; }; void main() { union un x; x.c[0]=10; x.c[1]=1; printf("\n%d",x.i); }
A.266
B.11
C.265
D.138
-
执行下列程序后,输出的结果是()。 include define S(X) X*X void main { int a=9,k=3,m=2; a/=S(k+m)/S(k+m): printf("%d",a); }
A.1
B.4
C.9
D.0
-
下列程序的执行结果为include<iostream.h>void main(){ int a=3,b=0; int * p=&a; b=+a++;
下列程序的执行结果为 include<iostream.h> void main() { int a=3,b=0; int * p=&a; b=+a++; cout<<*p<<','<<b<<end1; }
A.3,4
B.4,3
C.3,4
D.4,4
-
执行下列程序段,结果是 include<iostream.h> void main() { int x=40; char y='C'; int n; n=(x&0xff)&&(y>'B'); cout<<n;}
A.0
B.1
C.2
D.3
-
下列程序的执行结果是()。 include main { int a,b,c; a=b=2,c=I; c=(a++)-1;printf("%d,0Ad",a,c); c+=-a+++(b);printf("%d,%d",a,c); )
A.3,14,1
B.3,14,2
C.2,04,1
D.2,14,1
-
要求下面的程序运行后,显示如下结果: 2 10 4 6 1 5 2 3 2 4 7 8 5 1 3 2 下列程序执行后的输出结果是________。 include void main(); }
A.2,0
B.1,4
C.2,1
D.0,3
-
有下列程序 include<stdio.h>main()); } 程序执行时若输入: welcome you to beijing<回车>,则输出结果是
A.w,you,jing,o
B.welcome,you,jing,to
C.w,you,eeijing,u
D.w,xelcome,eeijing,u
-
以下程序段的执行结果为()。include< iostream.h>definePLUS(x,y)x+yvoid main (){int x=1,y=2,
以下程序段的执行结果为()。 include< iostream.h> definePLUS(x,y) x+y void main () {int x=1,y=2,Z=3,sum: sum=PLUS (x+y,Z) * PLUS (y,Z): cout<<"SUM="<<sum; cout<<endl:}
A.SUM=9
B.SUM=12
C.SUM=18
D.SUM=30
-
执行下述程序后,输出的结果是()。 include<stdio.h> define S(X)X*X void main { int
执行下述程序后,输出的结果是()。 include<stdio.h> define S(X)X*X void main { int a=9,k=3,m=2; a/=S(k+m)/s(k+m); printf("%d",a); }
A.1
B.4
C.9
D.0
-
下列程序的输出结果为()。 include<iostream.h> void main { char*a[]={”hell0”,”the”,”
下列程序的输出结果为()。 include<iostream.h> void main { char*a[]={”hell0”,”the”,”world”}; char** pa = a: pa++; cout<<*pa<<endl: }
A.hello
B.the
C.world
D.hellotheworld
-
写出下面程序执行后的运行结果。 include <stdio.h> define N 2 define M N+1 define N
写出下面程序执行后的运行结果。 include <stdio.h> define N 2 define M N+1 define NUM 2*M+1 int main() { int i; for(i=1;i<=num;i++) printf("%d",i); return 0; }>
-
下列程序执行输出的结果是()。include<stdio.h>f(int a){ int b=0;static c=3;a=c++;b++;return(
下列程序执行输出的结果是()。 include<stdio.h> f(int a) { int b=0; static c=3; a=c++;b++; return(a); } main() { int a=2,i,k; for(i=0;i<2;i++) k=f(a++); printf("%d\n",k); }
A.3
B.4
C.5
D.6
-
以下程序的执行结果为()。include<iostream.h>Class sample{ int n;public: sample(int i){n=i;}
以下程序的执行结果为()。 include<iostream.h> Class sample { int n; public: sample(int i){n=i; } operator ++() { n++; } void display() {cout<<n<<end1; } }; void main() { sample obj(5); obj++;
A.5
B.6
C.7
D.8
-
下列程序的输出结果为()。include<iostream.h) int ...
下列程序的输出结果为()。
include<iostream.h) int fune(int n)
{
if(n<1)return l;
else return n+time(n一1); return 0;
}
void main {
cout<<func(5)<<endl;
}
A.0
B.10
C.15
D.16
-
3、执行下列程序后,运行结果是()。include <stdio.h> include <math.h> int main() { int a=2,b=-1,c=3; if (a<b) if (b<0) c=0; else c++; printf("%d\n",c); return 0; }
A.0
B.2
C.3
D.4
-
有以下程序include<stdio.h>main{inty=10;while(y--);printf(y=%d\n,y);}程序执行后的输出结果是()
A.y=0
B.y=-1
C.y=1
D.while构成无限循环
-
下列程序的输出结果为()。 include<iostream.h)
A.0
B.10
C.15
D.16
-
以下程序的执行结果是() include {inti=10,j=10; printf("%d,%d/n",++i,j--); }。
A.11,10
B.9,10
C.11,9
D.10,9