单项选择题

有以下程序:
#include<iostream>
using namespace std;
int main( )
int a=5;b=4,c=3,d=2;
if(a>b>c)
cout<<d<<end1;
else if((c-1>:d) ==1)
cout<<d+1<<end1;
else
cout<<d+2<<end1;
return 0;
执行后的输出结果是( )。

A.2
B.3
C.4
D.编译时有错,无结果
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include<iostream> #include<string> using namespace std; int main() char arr[2][4]; strcpy(arr[0], you ); strcpy(arr[1], me ); arr[0][3]=’&’; cout<<arr[0]<<end1; return 0; 执行后的输出结果是( )。
A.you&me
B.you
C.me
D.err
单项选择题
有以下程序: #include <iostream> #include <cstdlib> using namespace std; int main() int arraysize; int *array; cout<< Please input the size of the array: ; cin>>arraySiZe; array=new int[arraysize]; if(array==NULL) cout<< allocate Error n ; exit(1); for(int i=0;i<arraysize;i++) array[i]=i*i; int j; cout<< which element you want to check: ; cin>>j; cout<<array[j]<<end1; return 0; 执行程序输入:10<空格>5,则输出结果为( )。
A.allocate Error
B.1
C.0
D.25
相关试题
  • 有以下程序: #include <fstream> #...
  • 若有以下程序: #include <iostream>...
  • 下面程序的输出结果是 【13】 。 #in...
  • 下面程序是一个堆栈的类模板,在横线处填上...
  • 实现编译时的多态性的机制称为 【10】 ...