Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <limits.h>
- #include <stdint.h>
- void changeVar(int *a);
- int main(int argc, const char *argv[]) {
- int x = 100;
- printf("x is: %d\n", x);
- changeVar(&x);
- printf("x is: %d\n", x);
- return 0;
- }
- void changeVar(int *a)
- {
- *a = 20;
- }
- /*
- out:
- x is: 100
- x is: 20
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement