Skip to content

Instantly share code, notes, and snippets.

@mumrah
Created March 23, 2010 15:03
Show Gist options
  • Save mumrah/341265 to your computer and use it in GitHub Desktop.
Save mumrah/341265 to your computer and use it in GitHub Desktop.
#include "stdio.h"
int* foo(){
static int out[2] = {1,2};
return out;
}
int main(int argv, char* argc){
int* bar = foo();
printf("%p\n", bar);
printf("%d %d\n", bar[0], bar[1]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment