-
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
-
BPNeuralNetwork2
BP神经网络解决异或问题,用VC可以打开浏览!也可与MATLAB接口使用.(BP neural network solutions differences or problems, with VC can open here! Also with the use of MATLAB interface.)
- 2006-06-02 19:54:24下载
- 积分:1
-
TI-RFID-antna
ti关于rf天线的设计、调试方法,13.56M精讲(
ti on rf antenna design, debugging method, 13.56M succinctly)
- 2016-07-01 12:31:01下载
- 积分:1
-
Image-evaluation-
Image evaluation (mean, clarity, information entropy, standard deviation)
- 2013-11-19 14:51:19下载
- 积分:1
-
dd
说明: 另一种潮流计算程序,本程序使用C语言编写(Another flow calculation procedures, the procedures using the C language)
- 2012-11-20 21:43:07下载
- 积分:1
-
fenzhi
#include <iostream.h>
int main()
{
int i(0),sum(0)
while (i<=100)
{
sum=sum+i
++i
}cout<<"sum="<<sum<<endl
return 0;
}
- 2009-12-11 22:03:44下载
- 积分:1
-
matlab--example
matlab 教程 matlab的入门到精 matlab详细代码范例(Matlab tutorial matlab approaches to fine matlab detailed example code
)
- 2012-03-29 11:54:10下载
- 积分:1
-
113172219hog
description phog en matlab
- 2009-09-24 23:21:58下载
- 积分:1
-
conjgrad
Numerical analysis did not pretreated Gauss method, the SSOR pre-Gaussian method, the pre-Gaussian polynomial method matlab program: CG
- 2015-02-08 05:32:32下载
- 积分:1
-
fenduanxianxing
三次样条插值,拉格朗日,分段线性插值的matlab程序(Cubic spline, the piecewise function interpolation method and Lagrangian matlab program, for example)
- 2014-12-16 15:36:23下载
- 积分:1