-
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
-
resizephoto
program to resize multiple photos in direct directory
- 2011-08-16 18:14:20下载
- 积分:1
-
Kaiser
FIR带通滤波器,用于分离混叠信号,适用于初学者(FIR band-pass filter, used to separate overlapping signals for beginners)
- 2010-05-16 11:08:40下载
- 积分:1
-
maincommand
matlab各类命令,随取随用,希望有帮助(matlab various commands, acquired and used, hope that helps)
- 2010-05-24 00:46:34下载
- 积分:1
-
NSGA-II
NSGAII,多目标优化领域,非控制遗传算法(NSGAII, the field of multi-objective optimization, non-control genetic algorithm)
- 2012-05-28 22:03:02下载
- 积分:1
-
mppts-sslas
solar simulink mppt algorithms
- 2011-10-28 01:33:30下载
- 积分:1
-
bpcs
这是一个把神经网络直接应用于轴承的故障诊断的程序,输入轴承的信号,直接得答案(This is a direct application of neural network in bearing fault diagnosis procedures, input bearing signal, a direct answer)
- 2011-11-13 20:58:00下载
- 积分:1
-
regionbased_seg
MATLAB code for Active Contour Segmentation
- 2015-02-03 12:41:51下载
- 积分:1
-
psk
it is phae shift keying
- 2009-12-24 17:01:27下载
- 积分:1
-
DS_fusion
DS证据,功能:融合x,y两行向量(经典Dempster-Shafer组合公式)(DS evidence features: integration of x, y two row vectors (classical Dempster-Shafer combination formula))
- 2015-01-09 11:51:38下载
- 积分:1