Skip to content

Instantly share code, notes, and snippets.

@stepancheg
Created July 28, 2012 11:43
Show Gist options
  • Save stepancheg/3192944 to your computer and use it in GitHub Desktop.
Save stepancheg/3192944 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int bar(long p) {
return 4;
}
int foo() {
return bar(0);
}
int bar(int p) {
return 2;
}
int main() {
// prints 4 currently
// but if foo is after all bar functions, then it prints 2
printf("%d\n", foo());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment