C程序中的函数调用 |
| |
引用本文: | 陈向阳.C程序中的函数调用[J].科教文汇,2011(3):44-45. |
| |
作者姓名: | 陈向阳 |
| |
作者单位: | 安庆医药高等专科学校公共基础部,安徽·安庆,246003 |
| |
摘 要: | 一个较大的程序总是被分成若干个程序块,每一个程序块都有其特定的功能,在C语言中,这些模块都用函数表示。函数是C程序的基础,由用户自定义的函数或是标准的库函数最终都是为main()主函数服务的。在C语言中,发生函数调用时,形参的变化会不会影响到实参是非常值得初学者注意的。本文结合实例分析了C程序中实参传递给形参的各种情况及这些情形中的形参的变化对实参的影响。
|
关 键 词: | 函数 形参 实参 值传递 地址传递 函数调用 |
The Function Call in C Program |
| |
Authors: | Chen Xiangyang |
| |
Institution: | Chen Xiangyang Anqing Pharmaceutical College,246003,Anqing,Anhui,China |
| |
Abstract: | A larger program is generally divided into several program blocks represented by different functions in the C programming language and each of them performs a specific task.Functions are the basis of the C program and those defined by users or the standard library functions all point to serve the main function,main().In the C programming language,what deserves the beginners' keen attention is whether the change of the formal parameter will influence the actual parameter when function call happens.In combination with examples,this paper tries to analyze the different situations in which the actual parameter transmits to the formal parameter and the influences over the actual parameter made by the change of the formal parameter. |
| |
Keywords: | function formal parameter actual parameter value transmission location transmission function call |
本文献已被 维普 万方数据 等数据库收录! |
|