简体   繁体   English

c中的printf函数

[英]printf function in c

c中的printf函数是通过引用还是通过值调用参数?

Everything in C is passed by value. C中的所有内容都按值传递。

Even things that look like they're passed by reference (ie, pointers to variables so that you can change the underlying variables) are in fact the values of the pointers being passed by value. 即使事情看起来像他们按引用传递(即指针变量,这样你可以改变的基础变量),实际上指针的被按值传递。

在C中没有通过引用传递,一切都是按值或按指针到地址的值

call by reference is not applicable in c. 通过引用呼叫不适用于c。 As in c we can't create alias of any variable,so eiher call by value or call by pointer mechanism is supported here.. 在c中我们不能创建任何变量的别名,因此这里支持按值调用或通过指针机制调用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM