Skip to content

Instantly share code, notes, and snippets.

@matburt
Forked from mumrah/gist:341265
Created March 23, 2010 15:49
Show Gist options
  • Save matburt/341316 to your computer and use it in GitHub Desktop.
Save matburt/341316 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdint.h>
uint8_t* foo(){
static uint8_t out[2] = {1,2};
return out;
}
int main(int argv, char** argc){
uint8_t* 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