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

题目内容 (请给出正确答案)
单选题
已知:int x=10,y=4;x/y的值为()
A

2

B

2.0

C

2.5

D

0


参考答案

参考解析
解析: 暂无解析
更多 “单选题已知:int x=10,y=4;x/y的值为()A 2B 2.0C 2.5D 0” 相关考题
考题 int y=1, x, *p, a[ ]={2,4,6,8,10}; p=a[1]; for(x=0;x3;x++) y + = * (p + x); printf("%d\n",y); 程序的输出结果y的值是__________ 。

考题 若有语句 double x=17;int y; ,当执行 y=(int)(x/5)%2; 之后 y 的值为 【 7 】 。

考题 ( 9 )有如下的函数定义:int Xfun(int x){int y=x;{int x=10; y+=x;}return x+y;}通过表达式 Xfun(5) 调用该函数,则得到的返回值为 【 9 】 。

考题 设有定义语句:double x=2.5, y=4.7;int a=7;那么表达式x+a%3*(int)(x+ y)%2/4的值为【 】。

考题 设x、y、t均为int型变量,执行以下语句后,y的值为______。x=y=3;t=++x||++y;A.不定值B.4C.3D.1

考题 主调函数中的两个变量a和b,要求调用函数交换a、b的值,返回交换结果,则以下正确的函数是______。A.funa(int*x,int*y) {int*p; *p=*x;*x=*y;*y=*p; }B.funb(int x,int y) {int t; t=x;x:y=y=t;}C.func(int*x,int*y) {*x=*y;*y=*x;}D.fund(int *x,int*y) {*x=*x+*y;*y=*x-*y;*x=*x-*y;}

考题 主调函数中的两个变量a和b,要求调用函数交换a、b值,返回交换结果,则以下正确的函数是______。A.funa(int*x,int*y) { int*p; *p=*x;*x=*y;*y=*p; }B.funb (int x,int y) {int t;t=x;x=y;y=t;}C.func(int *x,int*y) {*X=*y;*y=*x;}D.fund(int *x,int *y) {*x=*x+*y;*y=*x-*y;*x=*x-*y;}

考题 设x和y均为int型变量,则执行下面的循环后,y值为( )。 public class Sun { public static void main(String args[ ]) { int x, y; for (y=1, x=1; y<=50; y++) { if(x>=10) break; if (x%2==1) { x+=5; continue; } x-=3; } System.out.println (y); } }A.2B.4C.6D.8

考题 以下程序的执行后,x和y的值是 ______ 。 include class Sample { public: int x; 以下程序的执行后,x和y的值是 ______ 。 #include <iostream. h> class Sample { public: int x; int y; void disp() { cout<<"x="<<x<<", y="<<y<<end1; } }; void main() int Sample: :*pc; Sample s; pc=Sample:: x; s. *pc=10; pc=Sample: :y; s. *pc=.20; s. disp ();A.x=10, y=20B.x=20, y=10C.x=10, y=10D.x=20, y=20

考题 NgNN double x=17;int y;,当执行Y=(int)(x/5)%2;之后Y的值为【 】。

考题 以下程序输出结果是 ______。includevoid fun(int x,int y,int z){z=x+y;}void main 以下程序输出结果是 ______。 #include<iostream.h> void fun(int x,int y,int z){z=x+y;} void main() { int a=10; fun (2,2,a); cout<<a; }A.0B.4C.10D.无定值

考题 执行以下程序后,y的值是 ( ) main( ) { int a [ ]={2,4,6,8,10); int y=1,x, *p; p=a[1]; for(x=0;x<3; x + +) y + =* (p + x); printf("%d\n",y); }A.17B.18C.19D.20

考题 设x和y均为int型变量,则执行下面的循环后,y值为()。include void main(){int x, y;f 设x和y均为int型变量,则执行下面的循环后,y值为( )。#include <iostream.h>void main(){int x, y;for(y= 1,x= 1 ;y<=50;y++){ if(x>=10) }break;if (x%2==1){ x+=5; continue;} x-=3;} cout<<y;A.2B.4C.6D.8

考题 已知“int w=1,x=2,y=3,z=4;”,则表达式“w>x?w:z>y?z:x”的值是() A.1B.2C.3D.4

考题 设x和y为int型变量,则执行下面的循环后,y的值为( ) for(y=l, x=l; y=50; x==10) break; if(x%2==1){ x+=5; continue;} X -= 3; }A.2B.4C.6D.8

考题 执行以下语句的结果为______。 int x=3,y;int*px=x;y=*px++;A.x=3,y=4B.x=3,y=3C.x=4,y=4D.x=3,y不知

考题 已知函数y=4/(x-3),当3<x≤4,y的最大值为4,y的最小值为-4。()

考题 已知x,y=map(int,[’1’,’2’]),那么表达式x+y的值为()。

考题 已知:int x= 1,y = 2,z =0,则执行z=xy?(10+x,10-x):(20+y,20-y)后,z的值为()A、11B、9C、18D、22

考题 执行以下程序后,y的值是() main( ) { int a[]={2,4,6,8,10}; int y=1,x,*p; p=a[1]; for(x=0;x3;x++) y + = * (p + x); printf(""%d/n"",y); }A、17B、18C、19D、20

考题 设x和y均为int型变量,则执行下的循环后,y值为()for(y=1,x=1;y=50;y) {if(x==10))break; if(x%2==1) {x=5;continue;} x-=3; }A、2B、4C、6D、8

考题 已知:int x=7,y=5;x/y的值为()。A、1B、7C、0D、2

考题 Which two code fragments are most likely to cause a StackOverflowError?()A、int []x = {1,2,3,4,5};for(int y = 0; y  6; y++)    System.out.println(x[y]);B、static int[] x = {7,6,5,4};static { x[1] = 8;x[4] = 3; }C、for(int y = 10; y  10; y++)doStuff(y);D、void doOne(int x) { doTwo(x); }void doTwo(int y) { doThree(y); }void doThree(int z) { doTwo(z); }E、for(int x = 0; x  1000000000; x++) doStuff(x);F、void counter(int i) { counter(++i); }

考题 填空题已知x,y=map(int,[’1’,’2’]),那么表达式x+y的值为()。

考题 单选题已知:int x=7,y=5;x/y的值为()。A 1B 7C 0D 2

考题 多选题Which two code fragments are most likely to cause a StackOverflowError?()Aint []x = {1,2,3,4,5};for(int y = 0; y  6; y++)    System.out.println(x[y]);Bstatic int[] x = {7,6,5,4};static { x[1] = 8;x[4] = 3; }Cfor(int y = 10; y  10; y++)doStuff(y);Dvoid doOne(int x) { doTwo(x); }void doTwo(int y) { doThree(y); }void doThree(int z) { doTwo(z); }Efor(int x = 0; x  1000000000; x++) doStuff(x);Fvoid counter(int i) { counter(++i); }

考题 单选题已知:int x= 1,y = 2,z =0,则执行z=xy?(10+x,10-x):(20+y,20-y)后,z的值为()A 11B 9C 18D 22