假设变量$x=5,则表达式“$x<>4”的返回值类型是()。
第1题:
下面程序的结果为【7】。
#include
void main()
{
int a=1,b=2:
bool c=1;
if((a >b)‖C)cout<<”true”<
else
cout <<”false”<
}
第2题:
执行完下列代码段之后: bool x=true, y=false, z=false; x=x&&y‖z; y=x‖y&&z; z=!(x!=y)‖(y-z); 则x=false, y=false, Z=( )。
A.true
B.false
C.不确定
D.异常
第3题:
A.NULL
B.array(3){[0]=int(1) [1]=int(2) [2]=int(2)}
C.bool(true)
D.array(3){[2]=int(1) [1]=int(2) [0]=int(3)}
第4题:
下面程序的结果为_____。
include<iostream.h>
void main( )
{
int a=1,b=2;
bool c=1;
if((a>b) | | c) cout < < "tree" < < endl;
else
cout < < "false" < < endl;
}
第5题:
A.bool('')
B.bool(1)
C.bool(0)
D.bool([])
第6题:
下列函数的功能是判断字符串str是否对称,对称则返回true,否则返回false。请在画线处填上适当内容,实现该函数。
bool fun(char*str)}
int i:0,j=0;
while(str[j]) (6) ;
for(J--;i<j&&str[i]==str[J];i++,J--);
return i (7) J;
}
第7题:
A.为true
B.为false
C.与x的值相同
D.与x的值相反
第8题:
A.const M=10;
B.const int M=20;
C.const char ch;
D.const bool mark=true;
第9题:
有如下的函数定义:
int Xfun(int*a,int n){
int X*a;
for(int*pa=a+1;pa if(*pa>x)x=*pa;
retum x;
}
若在执行了语句:
int x[5]=(23,46,78,55,16);
后,通过表达式Xfun(x,5)调用该函数,则得到的返回值为______。
第10题:
下列函数的功能是判断字符串str是否对称,对称则返回true,否则返回false,则横线处应填上( )。 Bool fun(char*str) { int i=0,j=0; while(str[j])j++; for(j--;i<j&&str[i]==str[j];i++,j--); return i______j; }
A.>==
B.||
C.&&
D.<==