更多"下面程序的输出结果是 【9】 。
#include < iostr"的相关试题:
[单项选择]下面程序输出的结果是
#include<iostream.h>
void main( )
inti;
int a[3] [3] =1,2,3,4,5,6,7,8,91;
for(i=0;i<3;i++)
cout < < a[2-i] [i] < < " "; A) 1 5 9 B) 7 5 3 C) 3 5 7 D) 5 9 1
[填空题]下面程序的输出结果是 。
#include<iostream.h>
void main( )
{
int a[6] ={1,2,3,4,5,6};
for(int i=0;i<5;i++)
cout < < a[i] < <" ";
cout < < endl;
[单项选择]下列程序的输出结果是 #include void main( )
{ char * str="12123434"; int x1=0,x2=0,x3=0,x4=0,i;
for(i=0;str[i]!=’/0’;i++) switch(str[i]) {
case’1’:x4++; case’2’:x3++; case’3’:x2++;
case’4’:x1++; } cout < < x1 < < ","
< < x2 < < "," < < x3 < < "," < < x4;
A. 8,6,4,1
B. 8,6,3,2
C. 8,8,4,1
D. 8,6,4,2
[填空题]下面程序的输出结果是【 】。
#include<iostream.h>
void main( )
{
int a[6]={1,2,3,4,5,6};
for(int i=0;i<5;i++)
cout<<a[i]<<"";
cout<<endl;
=
[填空题]下面程序的输出结果是 【9】 。
#include<iostream.h>
void main( )
{
int a[6]={1,2,3,4,5,6};
for(int i=0;i<5;i++)
cout <<a[i] <<" ";
cout <<end1;
}
[填空题]下面程序的输出结果是 【9】 。
#include<iostream.h>
void main( )
int a[6]=1,2,3,4,5,6;
for(int i=0;i<5;i++)
cout <<a[i] <<" ";
cout <<end1;