Skip to content

Instantly share code, notes, and snippets.

@netsharec
Created July 27, 2018 15:42
Show Gist options
  • Save netsharec/1d6c64f2050dd947f7a0d4bb8cf3b6fd to your computer and use it in GitHub Desktop.
Save netsharec/1d6c64f2050dd947f7a0d4bb8cf3b6fd to your computer and use it in GitHub Desktop.
all: x
x: x1.o x2.o
#include <stdio.h>
int foo();
static int A;
int main(int argc, char **argv)
{
A = 1;
printf("A: %d\n", A);
printf("foo(): %d\n", foo());
return 0;
}
static int A;
int foo()
{
A = 2;
return A;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment