更多"下列程序的输出结果是( )。
#include <ios"的相关试题:
[单项选择]下列程序的输出结果是( )。
#include <iostream.h>
int b=2;
int func(int *A)
{ b + = *a;return(B) ;}
void main( )
{ int a=2,res=2;
res + = func(&A) ;
cout < < res;}
A. 4
B. 6
C. 8
D. 10
[单项选择]以下程序的输出结果是#include <iostream>using namespace std;int main( ){ cout.fill('*'); cout.width(5); cous<<hex<<100<<end1; return 0;}
A. **100
B. ***64
C. 100**
D. 64***
[单项选择]以下程序的输出结果是 #include<iostream.h> long fun(int n) { long s; if(n=1||n=2)s=2; else s=n-fun(n-1); return s; } void main( ) { cout<<fun(3);}
A. 1
B. 2
C. 3
D. 4
[单项选择]以下程序的输出结果是 #include<stdio.h> struct st i int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[0],60,&it[0],60,&dt[0],}; main( ) { p=aa; printf("%d/n",++(p->x));}
A. 10
B. 11
C. 51
D. 60
[单项选择]下列程序的输出结果是( )
#include<stdio.h>
main( )
{int a=3,b=2,c=1;
if(a<b)
if(b<0) c=0;
else c++;
printf("%d/n",c);
}
A. 0
B. 2
C. 1
D. 3
[单项选择]下面程序的输出结果是 #include<stdio.h> main( ) {int i=010,j=10; Printf(“%d,%d”,++i,j--); }
A. 11,10
B. 9,10
C. 010,9
D. 10,9
[单项选择]下列程序的输出结果是 #include"stdio.h" main( ) { int i,a=0,b=0; for(i=1;i<10;i++) { if(i%2==0) {a++; continue;} b++;} printf("a=%d,b=%d",a,b);}
A. a=4,b=4
B. a=4,b=5
C. a=5,b=4
D. a=5,b=5
[单项选择]以下程序的输出结果是( )。 #include <stdio.h> main( ) { int i; for(i=1;i<5;i++) { if(i%2) printf("*"); else continue; printf("#"); } printf("$/n");
A. *#*#*#$
B. #*#*#*$
C. *#*#$
D. #*#*$
[单项选择]下面程序的输出结果是( )。 #include <stdio.h> main( ) { int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a; printf("%d/n",*(p+2)); }
A. 3
B. 4
C. 1
D. 2
[单项选择]以下程序输出的结果是 #include<stdio.h> #include<string.h> main( ) {charw[][10]={"ABCD","EFGH","IJKL","MNOP"}1,k; for(k=1;k<3;k++) printf("%s/n",&w[k][k]);}
A. ABCD FGH KL
B. ABC EFG U M
C. EFG JK 0
D. FGH KL
[单项选择]下列程序的输出结果是
#include"stdio.h"
main( )
int i,a=0,b=0;
for(i=1;i<10;i++)
if(i%2==0)
a++;
continue;
b++;
printf("a=%d,b=%d",a,b);
A. a=4,b=4
B. a=4,b=5
C. a=5,b=4
D. a=5,b=5