Skip to content

Instantly share code, notes, and snippets.

@zznop
Created December 16, 2017 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zznop/fa630a353a69ea382d02a00e1c73a757 to your computer and use it in GitHub Desktop.
Save zznop/fa630a353a69ea382d02a00e1c73a757 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
void take_int(int j)
{
if (j == 1337)
printf("How could this be? j was never initialized!\n");
}
void recursive_func(int n)
{
static int i = 0;
i++;
if (i == 10)
return;
else
recursive_func(n);
}
void func()
{
int j;
take_int(j);
}
int main(int argc, char **argv)
{
int n = atoi(argv[1]);
recursive_func(n);
func();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment