首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下程序: #include<iostream.h> Float fun(int x, int y) { return(x+y) ;} void main( ) { int a=2,b=5,c=8; cout <
有以下程序: #include<iostream.h> Float fun(int x, int y) { return(x+y) ;} void main( ) { int a=2,b=5,c=8; cout <
admin
2010-12-16
40
问题
有以下程序: #include<iostream.h> Float fun(int x, int y) { return(x+y) ;} void main( ) { int a=2,b=5,c=8; cout < < fun((int) fun(a+c, b) ,a-c) ;} 程序运行后的输出结果是
选项
A、编译出错
B、9
C、21
D、9.0
答案
B
解析
本题的运算过程是fun((int) fun (a+c, b) ,a-c) ,fun((int) fun(10,5) ,2-8) ,fun ((int) 15.000000,-6) ,fun(15,-6) =9。
转载请注明原文地址:https://jikaoti.com/ti/zyL0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有以下程序#include#definePT3.5;#defineS(x)PT*x*x;main(){inta=1,b=2;printf("%4.1f\n",S(a+b));}程序运行后的输出结果是()。
下列特征中不是面向对象方法的主要特征的是()。
有以下程序:#include<stdio.h>Structst{intx,y;}data[2]={1,10,2,20};main(){structst*p=dat
使用VC++2010打开考生文件夹下modi1中的解决方案。此解决方案的项目中包含一个源程序文件modi1.c。在此程序中,函数fun的功能是:从s所指字符串中,找出t所指字符串的个数作为函数值返回。例如,当s所指字符串中的内容为“abcdabfab”,t
有以下程序#include<stdio.h>main(){charch=’D’;while(ch>’A’){ch--;putchar(ch);if(ch==’A’)
软件按功能可以分为应用软件、系统软件和支撑软件(或工具软件)。下面属于应用软件的是()。
以下针对全局变量的叙述错误的是()。
若有定义:inta=0,b=),c=0,d=0;,有C语言表达式(a++&&b++?c++:d++,以下关于其执行顺序的叙述中正确是()。
C语言源程序名的后缀是()。
在数据库系统的组织结构中,下列()映射把用户数据库与概念数据库联系了起来。
随机试题
我国器官移植的伦理原则是
债券投资者的税收状况也将影响其税后收益率,其中包括以下( )方面。
简述调式交替的基本类型。
公民的基本义务是指宪法所规定的公民必须履行的法律责任,它是社会和国家对公民最重要的、最严格、最高的要求。()
2013年3月末,金融机构人民币各项贷款余额65.76万亿元,同比增长14.9%,增速比上年同期低0.8个百分点。2013年3月末,主要金融机构及小型农村金融机构、外资银行人民币小微企业贷款余额11.78万亿元,同比增长13.5%,比全部企业
西周时期的中央司法官称为()。
主体改造客体的过程,也是
积分=________.
Studentdemonstratorsdemanded______.
Womendriversaremorelikelytobeinvolvedinanaccident,accordingtoscientists.Researchers【C1】______6.5millioncar
最新回复
(
0
)