-
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
-
matirx-muliplication
矩阵相乘,基于CUDA用并行算法实现矩阵的乘法(matrix muliplication with parallel algorithm implication matrix muliplication base on CUDA )
- 2011-04-29 10:19:32下载
- 积分:1
-
MatlabC
说明: 经典的matlab与VC++混合编程例子(using Matlab and c++ to program togother。)
- 2009-08-22 15:46:54下载
- 积分:1
-
PPR
有关投影寻踪回归的matlab编程,其中运用了遗传算法对其参数进行优化,实现起来比较简单(The projection pursuit regression matlab programming, including the use of a genetic algorithm to optimize its parameters, simple realization)
- 2021-02-22 17:09:41下载
- 积分:1
-
matlabABCbianjie
MATLAB在ABC边界上的FDTD程序仿真程序。(MATLAB in the ABC program on the border FDTD simulation program.)
- 2009-04-19 16:24:48下载
- 积分:1
-
downsample
matlab dsp中函数downsample和upsamplec代码(matlab dsp functions in downsample and upsamplec code)
- 2013-11-05 14:10:03下载
- 积分:1
-
CC
说明: 提取超声回波信号中回波时移的互相关计算。(Extraction echo ultrasonic echo signals of time-lapse cross-correlation calculation.)
- 2009-02-17 11:23:34下载
- 积分:1
-
ComTest
VC 调用matlab combuilder简单例子(VC call matlab com file)
- 2021-03-01 20:39:34下载
- 积分:1
-
c_matlab
一个关于MATLAB与c混合编程的资料,适合与混合编程的初学者(1 c mixed on MATLAB programming and data, suitable for beginners and mixed programming)
- 2009-11-21 16:35:52下载
- 积分:1
-
SwimmingPool2
Animation of swimming pool
- 2006-10-19 04:03:53下载
- 积分:1