Skip to content

Instantly share code, notes, and snippets.

@mrcat323
Created January 3, 2020 06:16
Show Gist options
  • Save mrcat323/270efe8d1fe6187ae132cdba5d483eb7 to your computer and use it in GitHub Desktop.
Save mrcat323/270efe8d1fe6187ae132cdba5d483eb7 to your computer and use it in GitHub Desktop.
Silly testing of extern
#include <stdio.h>
int i;
void declarei(void);
void printi(void);
void incrementedi(void);
int main()
{
declarei();
printi();
incrementedi();
printi();
return 0;
}
void declarei(void)
{
int i = 5;
}
void printi(void)
{
int i;
printf("%d", i);
}
void incrementedi(void)
{
int i;
i++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment