Skip to content

Instantly share code, notes, and snippets.

@SunXiaoShan
Last active August 7, 2019 14:48
Show Gist options
  • Save SunXiaoShan/f55b3cf00268c09974eb846e1f5f930a to your computer and use it in GitHub Desktop.
Save SunXiaoShan/f55b3cf00268c09974eb846e1f5f930a to your computer and use it in GitHub Desktop.
int gx = 1, gy = 2; // global variable
int func(int a ,int b) {
int lx, ly;
gx = a;
gy = b;
lx = 9;
ly = 3;
return gx + gy + lx + ly;
}
int main(int argc, char const *argv[])
{
int ans = 999;
ans = func(2, 9);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment