Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Apr 23rd, 2018
71
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.23 KB
| None
|
0
0
raw
download
clone
embed
print
report
void foo(int *x) {
*x = 2; // x的地址作为参数被传递,x的地址是pass by value,在foo的stack里被复制了一份,然后我们修改对应地址的值。
}
int main() {
int x = 1;
foo(&x);
printf("x: %d\n", x);
}
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
Python | 16 min ago | 3.80 KB
config.yaml
YAML | 20 min ago | 11.75 KB
How is FXOpen Expanding Its Share CFD Offerin...
PHP | 24 min ago | 2.95 KB
Exim Test Email Script
Bash | 24 min ago | 0.75 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 38 min ago | 0.39 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 💰
GetText | 43 min ago | 0.38 KB
api
JavaScript | 43 min ago | 8.37 KB
vendor-website-on-social-tab
PHP | 51 min ago | 1.51 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!