题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-08-22 04:10:38

[单项选择]下列程序的输出结果是( )。     #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 <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
[单项选择]下列程序的输出结果是( )。 #include<stdio.h> int b=2; int func(int*A) { b+=*a;retum b;} main( ) { int a=1,t=2; t+=func(&A) ; printf("%d/n",t); }
A. 4
B. 5
C. 6
D. 8
[单项选择]以下程序输出结果是( ): #include<iostream> using namespace std; void add(int X,int y,int *z) { *z=y+x; } int main( ) { int a,b,c; add(8,4,&a); add(6,a,&b); add(a,b,&c); cout<<a<<","<<b<<","<<c<<end1; return 0;
A. 12,10,14
B. 12,18,30
C. 12,6,18
D. 12,14,30
[单项选择]以下程序运行后的输出结果是 #include<stdio.h> main( ) { int i, j, m=1;   for(i=1; i<3; i++)  { for(j=3; j>0;j--)    { if(i*j>3) break;     m*=i*j;    }   printf("m=%d/n",m); }
A. m=6
B. m=2
C. m=4
D. m=5

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码