<分区>
Possible Duplicate:
Why scanf must take the address of operator
为什么我们在 printf() 的情况下传递变量,而在 scanf() 的情况下传递变量的地址? 为什么在scanf中传递地址
<分区>
Possible Duplicate:
Why scanf must take the address of operator
为什么我们在 printf() 的情况下传递变量,而在 scanf() 的情况下传递变量的地址? 为什么在scanf中传递地址
最佳答案
why to use '&' in scanf( ) but not in printf( )
'printf'()' only need the values in order to output them. 'scanf()' stores values, so it needs a place to store them. This is done by providing the addresses (in pointers) of where to store the values.
关于c - 在 scanf 中传递但不在 printf 中传递的地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12102753/