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

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

下面程序 main() { int x=100,a=10,b=20,ok1=5,ok2=0; if(a<b) if(b!=15) if(!ok1) x=1: else if(ok2)x=10; x=-1; printf("%d\n",x); } 的输出是______。

A.-1

B.0

C.1

D.不确定的值


参考答案

更多 “ 下面程序 main() { int x=100,a=10,b=20,ok1=5,ok2=0; if(a<b) if(b!=15) if(!ok1) x=1: else if(ok2)x=10; x=-1; printf("%d\n",x); } 的输出是______。A.-1B.0C.1D.不确定的值 ” 相关考题
考题 以下程序的输出结果是 【 17 】 。int fun(int *x,int n){ if(n==0) return x[0];else return x[0]+fun(x+1,n-1);}main( ){ int a[]={1,2,3,4,5,6,7}; printf("%d\n",fun(a,3));}

考题 有下面程序段: a:=false;b:=false;c:=false; x:=15; if a then x:=x0 else if b then x:=x-5 else if c then x:=20 else x:=25; 假设所有变量均已说明,程序运行后x的值是( ) 。 A25B20C15D5

考题 以下程序的输出结果是______nt fun(int*x,int n){if(n==0)return x[0];else return x[0]+fun(x+1,n-1);}main(){int a[]={1,2,3,4,5,6,7};printf(“%d\n”,fun(a,3));}

考题 以下程序的输出结果是【16】。main(){ int x=100, a=10, b=20, ok1=5, ok2=0;if(aelse if(ok2)x=10;else x=-1;printf("%d\n", x);}

考题 阅读下面程序: include void fun(int n) { int x(5); static int y(10); if(n>0) { 阅读下面程序:include<iostream.h>void fun(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<end1;}}void main(){int m(1);fun(m);}则该程序的输出结果是______。

考题 阅读下面程序: include void f(int n) { int x(5); static int y(10); if(n>0) { ++ 阅读下面程序:include<iostream.h>void f(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<endl;}}void main(){int m(1);f(m),}则该程序的输出结果是【 】

考题 下列程序的运行结果是() include main() {int x=5,a=1,b=2,c=5,d=0; if(a 下列程序的运行结果是( )#include<stdio.h>main(){ int x=5,a=1,b=2,c=5,d=0;if(a<b)if(b!=3)if(!c)x=1;elseif(d) x=l;else x=-1;printf("%d",x);}A.-1B.0C.1D.不确定的值

考题 下面程序的输出是main( ){int x=100,a=10,b=20,ok1=5,ok2=0;if(a<B)if(b!=15)if(!okl)x=1;elseif(ok2)x=10;x=-1;cout<<x<<endl;}A.-1B.0C.1D.不确定的值

考题 下列程序的运行结果是()。includemain(){int a=0,b=4,c=0,d=10,x; if(a)d=d-10; elseif 下列程序的运行结果是( )。 #include<stdio.h> main() { int a=0,b=4,c=0,d=10,x; if(a) d=d-10; else if(!b) if(!c) x=15; else x=25; printf("%d\n",d); }A.5B.3C.20D.10

考题 有以下程序:includeusing namespace std;int f(int,int);int main(){ int i:1,x; x=f 有以下程序: #include<iostream> using namespace std; int f(int,int); int main() { int i:1,x; x=f(i,i+1); cout<<x<<end1; return 0; } int f(int a,int b) { int c; c = a; if(a>b) c = 1; else if(a==b) c = 0; else c = -2; return c; } 运行后的输出结果是( )。A.1B.0C.-1D.-2

考题 执行下列语句:includeusing namespace std;int main(){int x=3;if(x=5)cout 执行下列语句: #include<iostream> using namespace std; int main() { int x=3; if(x=5) cout<<x++<<end1; else cout<<x<<end1; return 0; } 程序的输出是( )。A.3B.4C.5D.6

考题 下面程序 main() { int x=100, a=10, b=20, ok1=5, ok2=0; if(a<b) if(b!=15) if(!ok1) x=1; else if(ok2)x=10; x=1; printf("%d\n",x); } 的输出是______。A.-1B.0C.1D.不确定的值

考题 下列程序的运行结果是()。includemain(){int x=5,a=1,b=2,c=5,d=0; if(a 下列程序的运行结果是( )。 #include<stdio.h> main() { int x=5,a=1,b=2,c=5,d=0; if(a<B) if(b!=3) if(!C) x=1; else if(D) x=1; else x=-1; printf("%d",x); }A.-1B.0C.1D.不确定的值

考题 下面程序 main() { int x=100,a=10,b=20,okl=5,ok2=0; if(a<B) if(b!=15) if(!ik1) x=1; else if(ok2)x=10; x=-1; printf("%d\n",x); } 的输出是______。A.-1B.0C.1D.不确定的值

考题 下列程序的运行结果是()。includemain (){ int x=5, a=1, b=2, c=5, d=O ;if (a 下列程序的运行结果是( )。 #include<stdio.h> main () { int x=5, a=1, b=2, c=5, d=O ; if (a<b) if (b!=3) if (!c) x=1; else if(d)x=1; else x=-1; printf("%d",x); }A.-1B.0C.1D.不确定的值

考题 下面程序的输出是 main() {int x=100, a=10, b=20, ok1=5, ok2=0; if(a<b) if(b! =15) if( ! ok1) else if(ok2) x= 10 x=-1 cout<<x<<end1; }A.-1B.0C.1D.不确定的值

考题 下列程序的运行结果是()。includemain(){ int a=0,b=4,c=0,d=10,x;if(a) d=d-10;else i 下列程序的运行结果是( )。 #include<stdio.h> main() { int a=0,b=4,c=0,d=10,x; if(a) d=d-10; else if(!b) if(!c) x=15; else x=25; printf("%d\n",d); }A.5B.3C.20D.10

考题 以下程序的输出结果是main(){ int x=100,a=10,b=20,ok1=5,ok2=0; if(ab)if(b!=15)if(!ok1)x=1; else if(ok2)x=10; else x=-1; printf("%d\n",x);}

考题 有以下程序:includeusing namespace std;int main(){ intx=15; while(x>10 有以下程序: #include <iostream> using namespace std; int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++; break; } } cout<<x<<end1; return 0; }A.15B.16C.17D.18

考题 下列程序的输出结果是()。includeint fun(int x){ int a;if(x==0||x=1)return 3;elsea= 下列程序的输出结果是( )。#include<stdio.h>int fun(int x){ int a; if(x==0||x=1) return 3; else a=x-fun(x-2); return a;}void main(){ printf("%d",fun(7));}A.2B.8C.9D.5

考题 下列程序的输出结果是( )。 include int fun(int x) {int p;if(x==0‖x==1) return 3;el 下列程序的输出结果是( )。 #include<stdio.h> int fun(int x) { int p; if(x==0‖x==1) return 3; else p=x-fun(x-2); return p; } void main() { print f("\n%d", fun(5)); }A.5B.3C.7D.1

考题 【程序】SET TALK OFFINPUT “X=” TO XDO CASECASE X>10?“OK1”CASE X>20?“OK2”OTHERWISE?“OK3”ENDCASESET TALK ONRETURN程序运行时输入X值为9,则显示结果为 ______。A.“OK1”B.OK1C.“OK2”D.“OK3”

考题 程序运行时输入X值为15,则显示结果为 ______。A.“OK1”B.OK1C.“OK2”D.“OK3”

考题 程序运行时输入X值为100,则显示结果为 ______。A.“OK1”B.OK1C.“OK2”D.“OK3”

考题 程序运行时输入X值为0,则显示结果为 ______。A.“OK1”B.OK1C.“OK2”D.“OK3”

考题 下面程序输出的结果是( )。 main() { int x=100,a=10,b=20,ok1=5,ok2=0; if(a<b) if(b!=15) if(!ok1) x=-i; else if(ok2) x=10; x=1; printf("%d\n",x); }A.-1B.0C.1D.不确定的值

考题 下面程序 main() { int x=100,a=10,b=20,ok1=5,ok2=O; if(a<B) if(b!=15) if(!ok1) x=1; else if(ok2)x=10; x=1; printf("%d\n",x); } 的输出是______。A.-1B.0C.1D.不确定的值

考题 请为下面的程序设计符合判定覆盖的测试用例。 int main() { int a,b,c,x,y,z,t; scanf(“d%,d%,d%”,a,b,c,t); if a5 t1 x=10 else x=1; if b10 y=20 else y=2; if c15 z=30 else z=3; printf(“d%,d%,d%/n”,x,y,z) }