-
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
-
three-phase-inverter
电力电子技术中三相变流器的模型,可用于微电网中质量的控制(Three-phase power electronic converter technology models that can be used in quality control microgrid)
- 2014-12-24 20:45:46下载
- 积分:1
-
MMBT3904T
参考文件,MMBT3904 datasheet(References,MMBT3904 datasheet)
- 2010-09-29 13:08:45下载
- 积分:1
-
LMS_equalizer
自适应均衡中LMS算法的仿真程序,输出曲线与均方误差曲线(Adaptive equalization in the LMS algorithm simulation program, the output curve and the mean square error curve)
- 2011-06-20 16:30:32下载
- 积分:1
-
Complex-trace-analysis
地震勘探复数道分析,利用这种方法,能方便地从地震记录中分离表示地震波动力学特征的若干参数,如瞬时振幅,瞬时相位,瞬时频率和视极性等。(The seismic exploration plural channel analysis, using this method, can be easily separated from the seismic records certain kinetic characteristics of seismic wave parameters, such as the instantaneous amplitude, instantaneous phase, instantaneous frequency and apparent polarity.)
- 2013-05-16 10:13:00下载
- 积分:1
-
H1
说明: 运用相移延拓的方法有效地模拟地震波在介质中的传播路径。(Extension of the use of the phase shift method can effectively simulate seismic wave propagation path in the medium.)
- 2015-04-14 10:46:06下载
- 积分:1
-
GA-matlab
说明: MATlab和GA的潜用,将GA的算法程序写到MATLAB里面,用于求解优化问题(MATlab and GA' s potential use, the GA algorithm program written MATLAB inside, for solving optimization problems)
- 2009-08-27 11:44:51下载
- 积分:1
-
H_7level
7级级联H桥逆变器 多电平大功率电力电子 中高压无功补偿 变频器 matlab仿真模型(7 cascaded H-bridge inverter multi-level high-power electronic converter high voltage reactive power compensation)
- 2014-03-07 09:35:35下载
- 积分:1
-
Flight-Vehicle-Design
基于分布式视觉的飞行器位姿估计与路径规划(Document of design)
- 2014-12-08 08:48:57下载
- 积分:1
-
time_trace_utils
函数执行时间统计, 利用了C++类的自动释放功能(count function time costs)
- 2014-10-25 03:08:48下载
- 积分:1