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

题目内容 (请给出正确答案)
有以下程序:includemain(){int x=0,y=5,z=3; while(z-->0&& ++x<5) y=y-1; pr

有以下程序: #include <sldio.h> main() { int x=0,y=5,z=3; while(z-->0&& ++x<5) y=y-1; printf("%d,%d,%d\n",x,y,z); } 程序执行后的输出结果是( )。

A.3,2,0

B.3,2,-1

C.4,3,-1

D.5,-2,-5


参考答案

更多 “ 有以下程序:includemain(){int x=0,y=5,z=3; while(z-->0 ++x 有以下程序: #include <sldio.h> main() { int x=0,y=5,z=3; while(z-->0 ++x<5) y=y-1; printf("%d,%d,%d\n",x,y,z); } 程序执行后的输出结果是( )。A.3,2,0B.3,2,-1C.4,3,-1D.5,-2,-5 ” 相关考题
考题 有以下程序#include stdio.hint f(int x){ int y;if(x==0||x==1) return(3);y=x*x-f(x-2);return y;}main( ){int z;z=f(3); printf("%d\n",z);}程序的运行结果是A)0B)9C)6D)8

考题 有以下程序:main(){ int x=0,y=5,z=3; while(z- -0++x5?x:y--)y=y-1 Printf("%d,%d,%d\n",x,y,z);}程序执行后的输出结果是( )。A.3,2,0 B.3,2,-1 C.4,3,-1 D.3,-1,-2

考题 有以下程序:includeint f(int x){int y;if(x==0||x==1)return(3);y=x*x-f(x-2);return 有以下程序: #include<stdio.h> int f(int x) {int y; if(x==0||x==1)return(3); y=x*x-f(x-2); return y; } main() {int z; z=f(3);printf("%d\n",z); } 程序的运行结果是( )。A.0B.9C.6D.8

考题 有以下程序: main() { int x=0,y=5,z=3; while(z-->0++x<5) y=y-1; printf("%d,%d,%d\n",x,y,z); } 程序执行后的输出结果是( )。A.3,2,0B.3,2,-1C.4,3,-1D.5,-2,-5

考题 有以下程序#include stdio.hint f(int x){ int y;if(x==0||x==1) return(3);y=x*x-f(x-2);return y;}main(){ int z;z=f(3); printf("%d\n",z);}程序的运行结果是A.0B.9C.6D.8

考题 使用VC6打开老考生文件夹下的工程test5_1,此工程包含一个源程序文件test5_1.cpp,但该程序运行有问题,请改正程序中的错误,使程序的输出结果如下:x=3 y=5 z=08源程序文件test5_1.cpp清单如下:include<iostream.h>static int x=5;int z=0;int *add(int x,int y){cout<<"X="<<X<<"y="<<y<<" Z="<<z<<endl;z=z+x+y;/********found*********/return z;/********found*********/};void main(){int y=5;int x=3;/*********found********/cout<<(add(X,y))<<endl;}

考题 若有以下程序段:include using namespace std;int main (){ int a[]={1,4,5}; int *p 若有以下程序段: #include <iostream> using namespace std; int main () { int a[]={1,4,5}; int *p=a[0],x=6, y,z; for (y=0; y<3; y++) z= ( (* (p+y) <x) ? *(p+y) :x); cout<<z<<end1; return 0; } 程序运行后的输出结果是( )。A.1B.4C.5D.2

考题 以下程序的执行结果是______。 include void main() { int x=5 y=2; cout 以下程序的执行结果是______。include<iostream.h>void main(){int x=5 y=2;cout<<! (y==x/2)<<",";cout<<(y!=x%3)<<",";cout<<(x>0 y<0=<<",";cout<<(x!=y||x>=y)<<endl;}

考题 下面程序的结果【】。 include int f(int); void main() { int x=1,i; for (i=0; i 下面程序的结果【 】。include<iostream.h>int f(int);void main() {int x=1, i;for (i=0; i<3; i++)cout<<f(x)<<‘ ’ ;cout<<end1;}int f(int x){int y=1;static int z=3y++;z++;return (x+y+z);}

考题 有以下程序: main() { int x=0,y=5,z=31 while(z-->0++x<5)y=y-1; printf("%d,%d,%d\n",x,y,z); } 程序执行后的输出结果是 ______。A.3,2,0B.3,2,-1C.4,3,-1D.5,-2,-5

考题 以下程序的运行结果是include void sub(int x,int y,int *z){*z=y-x;}void main( ) 以下程序的运行结果是 #include<iostream.h> void sub(int x,int y,int *z) { *z=y-x;} void main( ) { int a,b,c; sub(10,5,a) ; sub(7,a,b) ; sub(a,b,c) ; cout << a <<","<< b <<"," << c << enA.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7

考题 有以下程序: main() { int x=0,y=5,z=3; while(z-->0++x<5) y=y-1; printf("%d,%d,%d\n",x,y,z); } 程序执行后的输出结果是A.3,2,0B.3,2,-1C.4,3,1D.5.-2,-5

考题 有以下程序includeintf(intx){inty;if(x==0||x==1)return(3);y=x*x-f(x-2);returny;}m 有以下程序 #include <stdio.h> intf(int x) { int y; if(x==0||x==1) return(3); y=x*x-f(x-2); return y; } main() { int z; z=f(3); printf("%d\n",z); } 程序的运行结果是A.0B.9C.6D.8

考题 请选出以下程序的输出结果_______。includesub(x,y,z)int x,y,*z;{*z=y-x;}main(){int 请选出以下程序的输出结果_______。 #include<stdio.h> sub(x,y,z) int x,y,*z; {*z=y-x;} main(){ int a,b,c; sub(10,5,A) ;sub(7,a,B) ;sub(a,b,C) ; printf("%d,%d,%d\n",a,b,C) ; }A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7

考题 有下列程序: include int f(int x) { int y; if(x=0‖x==1)r 有下列程序: #include <stdio.h> int f(int x) { int y; if(x=0‖x==1)return(3); y=x*x-f(x-2); return y; } main() { int z; z=f(3);printf("%d\n",z); 程序的运行结果是( )。A.0B.9C.6D.8

考题 有以下程序: main { int x=0,y=5,z=3; while(z--0&&++x5)y=y-l; printf("%d,%d,%d\n",x,y,z); } 程序执行后的输出结果是( )。A.3,2,0B.3。2. 1C.4,3,-1D.5,2.-5

考题 下列程序的输出结果是( ) main( ) { int x=0,y=5,z=3; while(z-->0++x5) y=y-1; printf(“%d,%d,%d\n”,x,y,z); }A.3,2,0B.3,2,-1C.4,3,-1D.5,-2,-5

考题 有以下程序:includevoid main(){ int x=5,y=2; cout 有以下程序: #include<iostream.h> void main() { int x=5,y=2; cout<<!(y==x/2)<<","; cout<<y!=x%3)<<","; cout<<(x>0y<0)<<","; cout<<(x!=y‖x>=y)<<endl: } 程序执行后的输出结果是( )A.0,0,0,1B.1,1,1 1C.0,0, 1,1D.1,1,0,0

考题 有以下程序:includemain(){int x=3,y=2,z=1; printf("%d\n",x/y~z);程序运行后的 有以下程序: #include <stdio.h> main() { int x=3,y=2,z=1; printf("%d\n",x/y~z); 程序运行后的输出结果是( )。A.3B.2C.1D.0

考题 有以下程序includeint f(intx){inty; if(x==0||x==1)return(3); y=x*x-f(x-2); return 有以下程序 #include <stdio.h> int f(int x) { int y; if(x==0||x==1) return(3); y=x*x-f(x-2); return y; } main() { int z; z=f(3); printf("%d\n",z); } 程序的运行结果是A.0B.9C.6D.8

考题 若有以下程序段;includeusing namespace std;int main(){ int a[]={1,4,5}; int *p=a[0],x=6,y,z; for(y=0;y<3;y++) z=((*(p+y)<x) ? *(p+y):x); cout<<z<<end1; return 0; } 程序运行后的输出结果是( )。A.1B.4C.5D.2

考题 请选出以下程序的输出结果 ______。include sub(x, y, z)int x, y,*z;{*z=y-x:}main() 请选出以下程序的输出结果 ______。#include <stdio. h>sub(x, y, z)int x, y,*z;{*z=y-x:}main(){ int a, b, c; sub 10,5,a);sub(7,a,b);sub(a, b, c); printf("%d,% d,/%d\n", a, b, c);}A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7

考题 有以下程序:main{ int x=0,y=5,z=3;while(z--05)y=y-l;printf(%d,%d,%d\n0&&++x5)y=y-l;printf(%d,%d,%d\n,x,y,z);}程序执行后的输出结果是( )。A.3,2,0B.3,2,-1C.4,3,-1D.5,2.-5

考题 以下程序的输出结果是( )。include fun(int x,int y,int z) { z=x*x+y*y;} main() { int a=31; fun(5,2,a); printf("%d",a);} A、0B、29C、31D、无定值

考题 下面程序的输出结果是()。includevoid main(){int x=-1,y=5,z;z=(x++ 下面程序的输出结果是( )。#include<iostream.h>void main(){int x=-1,y=5,z;z=(x++<0) (y-->=0);cout<<x<<'\t'<<y<<'\t'<<z<<end1;}A.-1 5 0B.-1 4 1C.0 4 1D.0 4 0

考题 单选题有以下程序:#include main(){ int x=0,y=6;  do {  while(--y)x++; } while(y--); printf(%d,%d,x,y); }程序的运行结果是(  )。A 5,0B 6,0C 5,-1D 6,-1

考题 单选题有以下程序:#include int f(int x){ int y; if(x==0||x==1)  return (3); y=x*x-f(x-2); return y;}main(){ int z; z=f(3); printf(%d,z);}程序的运行结果是(  )。A 0B 9C 6D 8