节点文献
C语言函数参数传递过程教学方法研究
Teaching Method Research of Function Parameters Transfer Process of C Programming Language
【摘要】 函数及其调用过程中的参数传递规律一直是C语言教学中的重点和难点,针对很多教材中给出的实参向形参传递过程的值传递及地址传递规律,从分析变量、常量等基本概念的本质出发,阐释了栈结构在函数参数传递过程中的作用,证实了"值传递"是函数唯一的参数传递方式,而不存在所谓的"地址传递"方式的结论,并通过指针、数组、结构体类型实参到形参的传递过程,进一步说明了C函数的参数传递过程受到参数数据类型制约的特点。
【Abstract】 The function and parameters transfer rules in the called procedure of function is always the key and difficult points of C programming language teaching process.According to the value and address transfer law in the process which translated the real parameters into the formal parameters in some given textbooks,the role of stack data structure was illustrated in the function parameters transfer process bases on the nature analysis of variables and constants,and confirmed the conclusion which the value transfer rule is the only way of C function parameters,but does not exist the so-call address transfer rule.The features constrained by data type of C function parameters transfer process is further illustrated through the parameters transfer process which translated the real parameters owned a pointer,array,structure data type to the formal parameters.
【Key words】 C programming language; transfer process of function parameters; teaching method;
- 【文献出处】 电脑与信息技术 ,Computer and Information Technology , 编辑部邮箱 ,2013年01期
- 【分类号】TP312.1-4;G712
- 【被引频次】3
- 【下载频次】110