Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int get(int* y) {
- *y = 2;
- }
- int main() {
- int x = 3;
- get(&x);
- printf("result: %d", x);
- }
- ---------------------------------------------------------------------------
- #include <stdio.h>
- int get(int* y) {
- *y = 2;
- }
- int main() {
- int x = 3;
- int *y = &x;
- get(y);
- printf("result: %d", *y);
- }
Advertisement
Add Comment
Please, Sign In to add comment