-
5
一道程序编译顺序的考题,涉及到函数调用的先后顺序及运算符号的优先级等问题。下面我展开给你讲。
C的程序编译总是从main函数开始的,这道题的重点在“fun((int)fun(a+c,b),a-c)) ”语句。
系统首先要确定最外层 fun()函数的实参,第一个参数的确定需要递归调用fun()函数(不妨称其为内层函数)。内层函数的两个参数分别为x=a+b=2+8=10、y=b=5,执行函数体x+y=10+5=15,于是得外层函数的参数x=15。其另一个参数y=a-c=2-b=-6,再次执行函数体,得最终返回值x+y=15+(-6)=9。 (Compiling together the sequence of test procedures, involving the sequence of function calls and operator symbols, such as the priority problem. Now I give you to start speaking. Procedures for C compiler always start from the main function and at这道题the focus of " fun ((int) fun (a+ c, b), ac)) " statement. System must first determine the most outer layer of fun () function of real parameters, the first parameters of recursive calls required fun () function (may be called the inner function). Inner function separately for the two parameters x = a+ b = 2+8 = 10, y = b = 5, to execute the function body x+ y = 10+5 = 15, then the outer function parameters were x = 15 . Its another parameter y = ac = 2-b =- 6, once again to execute the function body may eventually return the value of x+ y = 15+ (-6) = 9.)
- 2009-03-15 15:36:23下载
- 积分:1
-
shangpinguanli
说明: 商品采购管理源程序和Datebace
关键字:C++, SQL server, ado(Commodity procurement management source and Datebace Keywords: C++, SQL server, ado)
- 2010-03-18 19:59:35下载
- 积分:1
-
xy1
说明: c++源程序代码 c++源程序代码(source code c c c source code source code)
- 2006-04-30 15:17:31下载
- 积分:1
-
sja1000
LInux下SJA1000 CAN设备驱动(LInux SJA1000 CAN Device Driver)
- 2020-06-21 02:00:02下载
- 积分:1
-
Ocean
用C++编写的海浪仿真动画,里面有完整的程序。导入后可直接运行,或通过exe文件直接打开编译后的程序。(The wave simulation animation written in C++ has a complete program. After importing, it can run directly, or open the compiled program directly through exe file.)
- 2020-06-20 01:00:02下载
- 积分:1
-
资料汇总 杨秀珠
说明: 在单片机上用C语言实现煤气报警器,一旦煤气浓度超过预制,就会报警(Gas Alarm Based on Single Chip Microcomputer)
- 2019-03-29 11:47:16下载
- 积分:1
-
哈工大作业
这是哈尔滨工业大学的物联网智能信息处理的作业题,用c#语言开发,实现了对数据的各种预处理,包括缺省值处理,方差极差均值分析等,
- 2022-03-24 02:29:22下载
- 积分:1
-
单通道ADC
msp430芯片内部ad12模数转换程序源码。。(MSp430 chip internal Ad12 analog-to-digital conversion program source code.)
- 2020-06-18 03:40:01下载
- 积分:1
-
OPC服务
说明: 自动化领域上位机通过OPC服务读取三菱Q系列PLC的方法(How to read Mitsubishi Q series PLC through OPC service)
- 2020-05-07 08:47:29下载
- 积分:1
-
ch06-UART
基于KL25的开发例程,本例程关于异步通信,附带相关底层构建,十分适合初学者参考编程。(Based on KL25 development routine, the routine of asynchronous communication, with related underlying build, programming is very suitable for beginners reference.)
- 2013-12-17 21:58:51下载
- 积分:1