![](/img/trans.png)
[英]Why do we need the address-of operator (ampersand, &) when passing a variable to scanf, but not when assigning to it?
使用scanf function時,不能簡單地指定變量名。 相反,我們必須在變量名前加上一個 & 符號,例如int a; printf("enter your value"); scanf("%d", &a); int a; printf("enter your value"); ...