语句cout<<(24>>3)<< endl;的输出结果是()
第1题:
若有以下变量定义和函数调用语句: int a=25; print_value(&a); 则执行下面函数后正确的输出结果是( )。 void print_value(int*x) { cout<<++*x<<endl; }
A.23
B.24
C.25
D.26
第2题:
执行语句序列 iht i=0;while(i<25)i+=3;cout<<i; 输出结果是
A.24
B.25
C.27
D.28
第3题:
已知数组arr的定义如下: int arr[5]={1,2,3,4,5}; 下列语句中,输出结果不是2的是
A.cout<<*arr+1<<endl;
B.tout<<*(arr+1)<<endl;
C.cout<<arr[1]<<endl;
D.eout<<%arr<<endl;
第4题:
下列程序的输出结果是【 】。
include<iostream.h>
void main()
{
int i(1),j(2),k(3),a(10);
if(!i)
a--;
else if(j)
if(k)a=5;
else
a=6;
a++;
cout<<a<<endl;
if(i<j)
if(i!=3)
if(!k)
a=1;
else if(k)
a=5;
6+=2;
cout<<a<<endl;
第5题:
有以下程序
main( )
{ int a=5,b=4,c=3,d=2;
if(a>b>c)
cout<<d<<endl;
else if((c-1>=d)==1)
cout<<d+1<<endl;
else
cout<<d+2<<endl;
}
执行后输出结果是
A.2
B.3
C.4
D.编译时有错,无结果
第6题:
有如下程序: #inClude<iostream> using namespaCe std; Class test{ private: int a; publiC: test( ){Cout<<”ConstruCtor”<<endl;} test(int A.{Cout<<a<<endl;} test(Const test&_test){ a=test.a: Cout<<”Copy ConstruCtor”<<endl: } test( ){Cout<<”destruCtor”<<endl;} }; int main( ){ test A(3); return 0; } 执行这个程序的输出结果是( )。
A.3
B.ConstruCtor destruCtor
C.Copy ConstruCtor destruCtor
D.3 destruCtor
第7题:
下列程序段的输出结果是_____。
cout < < fixed < < 509.123456789 < < endl;
第8题:
语句cout<<(1|2)<<","<<(1||2)<< endl;的输出结果是()
第9题:
语句cout<<(2^5)<< endl;的输出结果是()
第10题:
0,0
1,1
2,0
3,1
第11题:
0,0
0,1
1,0
1,1
第12题:
12
9
6
3
第13题:
已知数组arr的定义如下: intarr[5]={1,2,3,4,5};下列语句中输出结果不是2的是( )。
A.cout<<*arr+1<<endl;
B.COUt<<*(art+1)<<endl;
C.cout<<arr[1]<<endl;
D.COUt<<*arr<<endl:
第14题:
执行语句序列 inti=0;while(i<25)i+=3;cout<<i; 输出结果是
A.24
B.25
C.27
D.28
第15题:
若有如下变量定义和函数调用语句: inta=5; fun(&A) ; 则执行下面函数后正确的输出结果是( )。 void fun(int*x) { cout<<++*x<<endl; }
A.3
B.4
C.5
D.6
第16题:
以下三条输出语句分别输出什么?
char str1[] = "abc";
char str2[] = "abc";
const char str3[] = "abc";
const char str4[] = "abc";
const char* str5 = "abc";
const char* str6 = "abc";
cout << boolalpha << ( str1==str2 ) << endl; // 输出什么?
cout << boolalpha << ( str3==str4 ) << endl; // 输出什么?
cout << boolalpha << ( str5==str6 ) << endl; // 输出什么?
第17题:
下列语句中,输出与众不同的是
A.cout<<"1."<<setfill('')<<"Hello!"<<endl;
B.cout<<"1."<<''<<"Hello! \n";
C.cout<<"1. Hello!"<<endl;
D.cofit<<"1."<<setw(7)<<"Hello!";
第18题:
以下程序的执行结果是______.
include<<iostream.h>
c1ass A
{
public:
virtual void funl () { cout<<"A fun1"<<endl;}
virtual void fun2 () {cout<<"A fun2"<<endl;
void fun3 () {cout<<" A fun 3 "<<endl:)
void fun4 () {cout<<" A fun4 "<<endl:}
第19题:
语句cout<<(3<<3)<< endl;的输出结果是()
第20题:
以下语句中,输出结果与众不同的一个是()
第21题:
设有char *s="ABCDE";cout<< (s+1)<< endl;输出结果是()
第22题:
1
3
7
10
第23题:
24
12
9
6