题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-04 16:39:37

[单项选择]下列程序的输出结果为
#include<iostream.h>
int func (int n)

if ( n <1)return l;
else return n+func ( n-1 );
return O;

void main( 0

cout <<func(5)<<end1;

A. 0
B. 10
C. 15
D. 16

更多"下列程序的输出结果为 #include<iostream.h> i"的相关试题:

[单项选择]下列程序的输出结果为
#include<iostream.h>
int func(int n)

if(n<1) return 1;
else retur n+func(n-1) ;
return 0;

void main( )

cout < < func(5) < < endl;

A) 0 B) 10 C) 15 D) 16
[填空题]下列程序的运行结果是 【9】
#include<iomanip. h>
int Func(int * a, int n) int s=1;
for(int i=0;i<n; i++)
s*= * a++;
return s;void main( ) int a[]=1,2,3,4,5,6,7,8);
int b=Func(a,6)+Fnnc(& a [5],2);
cout<<"b= "<<b<<end1;

[填空题]以下程序运行结果是 【12】
#include<stdio.h>
long func(int x)
long p;
if(x==0‖x==1)return(2);
p=x*func(x-1);
return(p);
main( )
printf("%d/n",func(4));
[填空题]以下程序的运行结果是 【12】
#include<iostream.h>
func(int a,int b)

statlC int m=0,i=2;
i+=m+1;
m=i+a+b;
return m;

void main( )
int k=4,m=1,p;
p=func(k,m);cout<<p<<”,”;
p=func(k,m);cout<<p<<endl;

[单项选择]有如下程序
#include<iostream.h>
int func(int a,int b)
return(a+b) ;
void main( )
int x=2,y=5,z=8, r;
r=func ( func(x,y),z);
cout << r;

该程序的输出的结果是
A. 12
B. 13
C. 14
D. 15
[单项选择]以下程序的输出结果是( )。
#include<iostream.h>
void func(char**m)

++m:
cout<<*m<<end1;

void main( )

static char*a[]="MORNING","AFTERTOON","EVENING";
char**n:
n=a;
func(n);

A. 为空
B. MORNING
C. AFTERTOON
D. EVENING
[填空题]下列程序的输出结果为 【12】
# include <iostream, h>
void Func(char ch) switch (ch).

case ’A’: case ’a’
cout<<"优秀"<<end1;
case ’B’: case ’b’:
cout<<"良好"<<end1;
break;
case ’C’: case ’c’:
cout<<"及格" <<end1
break;
default
cout<<"不及格"<<end1;
void main( ) char ch1 =’b’
Fune(chl);
Func(’A’);

[单项选择]请读程序:
#include<stdio.h>
func(int a,int b)
int c;
c=a+b;
return c;

main( )
int x=6,y=7,z=8,r,
r=func((x-,y++,x+y),z-);
printf("%d/n",r);

上面程序的输出结果是_______。
A. 11
B. 20
C. 21
D. 31
[单项选择]请读程序:
#include <stdio.h>
func(int a, int b)
int c;
c=a+b;
return c;

main( )
int x=6,y=7,z=8,r;
r=func((x--,y++,x+y),z--);
printf("%d/n",r);
上面程序的输出结果是( )。
A. 11
B. 20
C. 21
D. 31
[填空题]下列程序的输出结果为______。
#include<iostream.h>
void Func(char ch)

switch(ch)

case ’A’:case ’a’:
cout<<"优秀"<<endl;
case ’B’:case ’b’:
cout<<"良好"<<endl;
break;
case ’C’:case ’c’:
cout<<"及格"<<endl;
break;
default:
cout<<"不及格"<<endl;


void main( )

char ch1=’b’
Func(ch1);
Func(’A’);

我来回答:

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

订单号:

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