Created
June 25, 2020 12:11
-
-
Save Jay-flow/1c0044dc3cc07536f02c0af63a53993b to your computer and use it in GitHub Desktop.
How the computer handles variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void add(int *a) { | |
*a = (*a) + 10; | |
} | |
int main(void) { | |
int a = 7; | |
add(&a); | |
// print: a = 17 | |
printf("%d\n", a); | |
system("pause"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment