网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
下面程序的输出结果为( )。
A
x=99
B
x=9
C
x=0
D
异常
参考答案
参考解析
解析:
引用是个别名,对引用的任何操作实际上就是对所代表的数据对象的操作。系统不会为引用再次分配存储空间。因此,语句“int &y=x;”声明y为对x的引用,因此y=99,x=99,输出x=99。
引用是个别名,对引用的任何操作实际上就是对所代表的数据对象的操作。系统不会为引用再次分配存储空间。因此,语句“int &y=x;”声明y为对x的引用,因此y=99,x=99,输出x=99。
更多 “单选题下面程序的输出结果为( )。A x=99B x=9C x=0D 异常” 相关考题
考题
下面程序的输出结果是【】。define MIN(a,b) (((a)void main(){int
下面程序的输出结果是【 】。define MIN(a,b) (((a)<(b))?a:b)include <iostream.h>void main(){int x= 3, y=5;cout<< MIN(x,y)<<end1;}
考题
下面程序段的输出结果是()。includemain(){float x=1.236547;printf("%f\n",(int)(x*10
下面程序段的输出结果是( )。 #include<stdio.h> main() {float x=1.236547; printf("%f\n",(int)(x*1000+0.5)/(float)1000); }A.1.237000B.输出格式说明与输出项不匹配,输出无定值C.1.236000D.1.24
考题
下面程序的输出结果是 ( )main( ){ int x,y,z;x=0,y=z=-1;x+=-z- - -y;pritnf("x=%d\n",x);}A.x=4B.x=0C.x=2D.x=3
考题
( 30 )下面程序运行时,若输入 395 ,则输出结果是Private Sub Comand1_Click ()Dim x%x=InputBox (" 请输入一个 3 位整数 ")Print x Mod 10,x\100, ( x Mod 100 ) \10End SubA ) 3 9 5B ) 5 3 9C ) 5 9 3D ) 3 5 9
考题
下面程序的输出结果是()。includemain(){int x=7,y=3;printf("%d",y=x/y);}A.0B.2C.3D.
下面程序的输出结果是( )。 #include<stdio.h> main() {int x=7,y=3; printf("%d",y=x/y); }A.0B.2C.3D.不确定的值
考题
下面程序的输出结果为( )。 public class Test { public static void main (String args[]) { String X="ABCD"; String Y="EFG"; X=X.substring (X.length()-Y.length()); System.out.println(X); } }A.ABCB.BCDC.EFGD.ABCDEFG
考题
下面程序的输出结果为()。ineludevoid main(){int x;int y=x;//变量引用y=99;c
下面程序的输出结果为( )。 #inelude<iostream.h> void main() { int x; int y=x;//变量引用 y=99; cout<<"x="<<x<<end1; }A.x=99B.x=9C.x=0D.异常
考题
下面程序的输出结果是 ______。includevoidmain(){intx=20;inty=x;cout
下面程序的输出结果是 ______。 #include<iostream.h> void main(){ int x=20; int y=x; cout<<(x==y)<<“”; cout<<(x==y)<<end1: }A.20 20 20 20B.20 20C.1 1D.出错
考题
下面的程序输出结果是()。includeusing namespace std;void add(){static int x;x++;c
下面的程序输出结果是( )。 #include<iostream> using namespace std; void add() { static int x; x++; cout<<x<<''; } int main() { for(int i=0;i<3;i++) add(); return 0; }A.111B.123C.222D.333
考题
下列程序的输出结果为()。includevoid main(){int x;int y=x;//变量引用y=99;
下列程序的输出结果为( )。 #include<iostream.h> void main() { int x; int y=x;//变量引用 y=99; cout<<"x="<<x<<end1; }A.x=99B.x=9C.x=0D.异常
考题
下面程序的输出结果是【】。includeint add(int a, int b);void main(){extern int x,
下面程序的输出结果是【 】。include<iostream.h>int add(int a, int b);void main(){extern int x, y;cout<<add(x, y)<<end1;}int x(20),y(5);int add(int a, int b){int s=a+ b;return s;}
考题
下面程序的输出结果是 ( ) main( ) {int x,y,z; x=0;y=z=-1; x+=-z - - -y printf("x=%d\n",x); }A.x=4B.x=0C.x=2D.x=3
考题
下面程序输出的结果是()。includeusing namespace std;int fuc (char *x);int main(){
下面程序输出的结果是( )。 #include<iostream> using namespace std; int fuc (char *x); int main(){ cout<<fuc("hello")<<endl; return 0; } int fuc(char *x){ char *y=x; while(*y! ='\0')y++; return(y-x); }A.5B.6C.0D.语法错误,不能输出结果
考题
下面程序输出的结果是( )。 include using namespace std; class A{
下面程序输出的结果是( )。 #include<iostream> using namespace std; class A{ int X; public: A(int x):x(++x){} ~A(){cout<<x;} }; class B:public A{ int y; public: B(int y):A(y),y(y){} ~B(){cout<<y;}; }; void main(){ B b(3); }A.34B.43C.33D.44
考题
在下面程序运行后,输出结果为 ______。includevoid count(int x[],int n,int y
在下面程序运行后,输出结果为 ______。 #include<iostream.h> void count(int x[],int n,int y){ int k; y=0; for(k=0:k<n;k++) if(x[k]<0) y++; } void main(){ int b[]={2,1,-8,-3,7,2,4,6,0,-13}; int x; count(b,10,x); cout<<“x”<<x<<end1; }A.x=3B.x=5C.出错D.x=0
考题
以下程序输出什么?"""x=1"""whilex:print(x)
A.运行结果显示NameError:name'x'isnotdefinedB.运行结果无限循环输出1C.它等价于下面的程序#x=1whilex:print(x)D.它等价于下面的程序whilex:print(x)
考题
设x为unsignedint类型,则执行下列语句输出结果是()?x=65535;printf(""%d/n"",x);A、ASCII字符B、65535C、0D、-1
热门标签
最新试卷