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

题目内容 (请给出正确答案)
单选题
下列赋值语句正确的是哪一项?()
A

 long val=6;

B

 int age = 23L;

C

 short x=1,y=2,z     z=x+y;

D

 int a= ‘A’;


参考答案

参考解析
解析: 暂无解析
更多 “单选题下列赋值语句正确的是哪一项?()A  long val=6;B  int age = 23L;C  short x=1,y=2,z     z=x+y;D  int a= ‘A’;” 相关考题
考题 下面结构体的定义语句中,错误的是A)struct ord {int x;int y;int z;}; struct ord a;B)struct ord {int x;int y;int z;} struct ord a;C)struct ord {int x;int y;int z;} a;D)struct {int x;int y;int z;} a;

考题 以下选项错误的是A.main(){ int x,y,z;x=0;y=x-1;z=x+y;}B.main(){ int x,y,z;x=0,y=x+1;z=x+y;}C.main(){ int x;intint y;x=0,y=x+1;z=x+y;}D.main(){ int x,y,z;x=0;y=x+1;z=x+y,}

考题 ( 29 )有如下程序:#includeiostreamusing namespace std;class Part{public:Part(int x=0):val(x) {coutval;}~Part(){coutval;}private:int val;};class Whole{public:Whole(int x ,int y, int z=0):p2(x),p1(y),val(z){coutval;}~Whole(){coutval;}private:Part p1,p2;int val;};int main(){Whole obj(1,2,3);return 0;}程序的输出结果是A ) 123321B ) 213312C ) 213D ) 123123

考题 以下程序的输出结果是 【10】 。fun (int x,int y,int z){ z =x*x+y*y;}main (){int a=31;fun (6,3,a)printf ("%d", a)}

考题 有如下程序: include using namespace std; class Part{ public: 有如下程序: #include <iostream> using namespace std; class Part{ public: Part(int x=0):val(x) { cout<<val; } ~Part() { cout<<val; } private: int val; }; class Whole { public: Whole(int x, int y, int z=0):p2(x),p1 (y),val(z) { cout<<val; } ~whole() { cout<<val; private: Part p1,p2; int val; }; int main() { Whole obj (1,2,3); return 0; }程序的输出结果是A.123321B.213312C.213D.123123

考题 下面结构体的定义语句中,错误的是( )。 A.struct ord{int x;int Y;int Z;};struet ord a;SXB 下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int Y;int Z;};struet ord a;B.struct ord{int x;int y;int Z;}struct ord a;C.struct ord{int X;int Y;int Z;}a;D.struct{int X;int y;int Z;}a;

考题 以下程序执行后的输出结果是( )。include usingnamespacestd;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include <iostream> using namespace std; void try(int,int,int,int); int main ( ) { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = X*X; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

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

考题 有如下程序:includeusing namespace std;class Part{public:Part(int x=0):val(x){co 有如下程序: #include<iostream> using namespace std; class Part{ public: Part(int x=0):val(x){cout ~Part( ){cout<<val;} pritave: int val; }; class Whole{ public: Whole(int x,int Y,int z=0):p2(x),p1(Y),val(z){cout<<val;} ~Whole( ){cout<<val;} pritave: Part p1,p2; int val; f; int main( ){ Whole obj(1,2,3); return 0; } 程序的输出结果是A.123321B.213312C.213D.123123

考题 以下程序的输出结果是______。fun(int x,inty,int z){ z=x*x+y*y;}main(){ int a=31;fun(6,3,a)printf("%d",a)}

考题 以下程序的输出结果是______。 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.无定值

考题 有如下程序:includeusing namespace std;class Part{public:Part(int x=0):val(x) {c 有如下程序: #include<iostream> using namespace std; class Part{ public: Part(int x=0):val(x) {cout<<val;} ~Part(){cout<<val;} private: int val; }; class Whole{ public: Whole(int x ,int y, int z=0):p2(x),p1(y),val(z){cout<<val;} ~Whole(){cout<<val;} private: Part p1,p2; int val; }; int main() Whole obj(1,2,3); return 0; } 程序的输出结果是( )。A.123321B.213312C.213D.123123

考题 若有以下变量和函数说明:includecharCh='*';void sub(int x,int y,char ch,double* 若有以下变量和函数说明: #include<iostream.h> charCh='*'; void sub(int x,int y,char ch,double*Z) { switch(ch) { case'+':*Z=x+y;break; case'-':*Z=x-y;break: case'*':*Z=x*y;break; case'/':*z=x/y;break: } } 以下合法的函数调用语句是( )。A.sub(10,20,Ch,y);B.sub(1.2+3,2*2,'+',Z);C.sub(sub(1,2,'+',y),sub(3,4'+',x),'-',y);D.sub(a,b,x,ch);

考题 已有定义:int x=3,y=4,z=5,则表达式!(x+y)+z-1y+x/2的值是A.6B.0C.2D.1

考题 已有定义int x=3, y=4, z=5;则表达式“!(x+y)+z-1y+z/2”的值是________。A.6B.0C.2D.1

考题 以下程序输出结果是 ______。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.无定值

考题 有如下程序: #jnCludeiostream using namespaCe std; Class Part{ publiC: Part(int x=0):val(X){Coutval;} ~Part{Coutval;} private: int val; t }; Class Whole{ publiC: Whole(int x,int Y,int z=0):p2(x),pl(y),val(z){Coutval;} ~Whole{eoutval;} private: Part pl,p2; int val; }; int main { Whole obj(1,2,3); return 0; } 执行这个程序的输出结果是( )。A.123321B.213312C.213D.123123

考题 以下程序执行后的输出结果是include using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y,int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 下列函数定义不正确的是 ( )A.int max { int x y,z; z=x>y? x: y }B.int max(x,y) int x,y; { int z; z=x>y? x:y; return(z) }C.int max(x,y) { int x,y z; z=x>y? x: y; return(z); }D.int max( ) {}

考题 以下程序执行后的输出结果是includeusing namcspace std;void try(int,int,int,int); 以下程序执行后的输出结果是 #include<iostream> using namcspace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 以下程序执行后的输出结果是()。includeusing namespace std;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include<iostream> using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y, int z,int r) { z = x+y; X = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 已有定义:int x=3,y=4,z=5;,则表达式!(x+y)+z-1 y+z/2的值是A.6B.0C.2D.1

考题 以下程序执行后的输出结果是include.using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include<iostream>. using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 下列带缺省值参数的函数说明中,正确的说明是 ______。A.int Fun(int x, int y=2,int z=3);B.int Fun(int x=1,int y,int z=3);C.int Fun(int x, int y=2,iht z);D.int Fun(int x=1,int y, int z=3);

考题 若有int x=3,y=4,z=5; ,则表达式 !(x+y)+z-1  y+z/2的值是()

考题 下列赋值语句正确的是哪一项?() A、 long val=6;B、 int age = 23L;C、 short x=1,y=2,z     z=x+y;D、 int a= ‘A’;

考题 单选题下面结构体的定义语句中,错误的是(  )。A struct ord{int x;int y;int z;};struct ord a;B struct ord{int x;int y;int z;}struct ord a;C struct ord{int x;int y;int z;}a;D struct {int x;int y;int z;}a;