现代电子技术2012,Vol.35Issue(4):55-56,2.
C语言函数参数传递规律
Parameter delivery law of C language function
赵娟 1樊超2
作者信息
- 1. 西安工业大学北方信息工程学院,陕西西安 710025
- 2. 陕西青年职业学院,陕西西安 710068
- 折叠
摘要
Abstract
C language module design is implemented mainly through the function. The information between the functions is delivered by parameters. The parameter delivery of the function includes the delivery value and delivery address. In order to distinguish the difference of the two modes, two methods of examples and illustrations are adopted. The instances which takes variable, array name and pointer as parameters are listed. By comparing the variation of formal parameter and actual parameter after function call, two laws of the parameter delivery, while the function was called, were summed up: the base type variable, array element and structure variables as parameters are passed by value, that is, they deliver information in one ways the array name and pointer as parameters are passed by address, that is, they share the same address.关键词
传值/传址/C语言函数/地址共享Key words
delivery value/ delivery address/ C language function/ address sharing分类
信息技术与安全科学引用本文复制引用
赵娟,樊超..C语言函数参数传递规律[J].现代电子技术,2012,35(4):55-56,2.