呼叫按引用 [英] Call-by-Reference
问题描述
C是否具有函数的Call-By-Reference?
我认为它不是。我是对的吗?
Does C have Call-By-Reference for a function??
I think it doesn''t. Am I right?
推荐答案
从技术上讲,C是否具有函数的Call-By-Reference?
I认为它不是。我是对的吗?
Technically speaking, does C have Call-By-Reference for a function??
I think it doesn''t. Am I right?
co ** ************ @ gmail.com 写道:
从技术上讲,C是否具有Call-By-Reference for一个函数??
我认为它不是。我对吗?
Technically speaking, does C have Call-By-Reference for a function??
I think it doesn''t. Am I right?
你说得对:C函数参数按值传递。
参数值当然可以是指针 - 也就是说,
参数值可以引用另一个对象。但
参数本身总是按值传递。
-
Eric Sosman
es ***** @ ieee-dot-org.inva 盖子
co**************@gmail.com 写道:
C是否具有函数的Call-By-Reference?
Does C have Call-By-Reference for a function??
不是直接的,不是;所有参数都按值传递。但是当然
你可以通过传递指针来做同等的事情。
-
Keith Thompson(The_Other_Keith) ks *** @ mib.org < http://www.ghoti.net/~kst>
诺基亚
我们必须做点什么。这是事情。因此,我们必须这样做。
- Antony Jay和Jonathan Lynn,是部长
Not directly, no; all parameters are passed by value. But of course
you can do the equivalent by passing pointers.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
这篇关于呼叫按引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!