更多"以下程序的输出结果是 #include<iostream.h> v"的相关试题:
[填空题]以下程序的输出结果是______。
#include
void main( )
{ int a=0;
a+=(a=8);
cout<<a;
}
[单项选择]下列程序的输出结果是 #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
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 "stdio.h"
void main( )
{
char s[]="/"hello/"";
printf("%s",s);
}
[填空题]以下程序输出的结果是 。
#include<iostream.h>
void main( )
int a=5,b=4,c=3,d;
d=(a>b>c) ;
cout < < d;
[填空题]以下程序输出的结果是 【10】 。
#include<iostream.h>
void main( )
int a=5,b=4,c=3,d;
d=(a>b>c);
cout<<d;
[简答题]以下程序输出的结果是:
#include "stdio.h"
void main( )
{char ch[]="I love Great Wall of China!";
printf("%c",*(ch+5));
}
[单项选择]以下程序的输出结果是
#include<iostream.h>
void main( )
int i, j, x=0;
for(i=0;i<2;i++)
x++;
for(j=0;j<3;j++)
if(j%2) continue;
x++;
x++;
cout < < "X=" < < x;
A. x=4
B. x=8
C. x=6
D. x=12
[简答题]
以下程序输出的结果是:
#include "stdio.h"
void main( )
{int a=12,b=13;
a=a+b;
b=a-b;
a=a-b;
printf("%d,%d",a,b);
}
[单项选择]以下程序的输出结果是
#include<iostream.h>
void main( )
int x=1,y=3;
cout < < x++ < < ",";
int x=0;x+=y * 2;
cout < < x < <"," < < y < <",";
cout < < x < < "," < < y;
A) 1,6,3,1,3 B) 1,6,3,6,3 C) 1,6,3,2,3 D) 1,7,3,2,3