码迷,mamicode.com
首页 > 其他好文 > 详细

c-参数(argument)

时间:2014-08-22 15:45:59      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:os   io   ar   cti   sp   ad   on   ef   res   

  In  C,  array arguments behave as though they are passed by reference, and scalar variables and constants are passed by value (like var parameters and value parameters, respectively, in Pascal or Modula).

  Thus, any changes made by a function to a scalar argument are lost when the function returns; the function cannot change the value of the calling program?s argument in this manner.

  When a function changes the value of an element of an array argument, however, the array in the calling program is actually modified. 

c-参数(argument)

标签:os   io   ar   cti   sp   ad   on   ef   res   

原文地址:http://www.cnblogs.com/listened/p/3929334.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!