Skip to content

Instantly share code, notes, and snippets.

@oatmealraisin
Created April 20, 2018 19:46
Show Gist options
  • Save oatmealraisin/b952ab56ced2682fc2901fff5a1586c7 to your computer and use it in GitHub Desktop.
Save oatmealraisin/b952ab56ced2682fc2901fff5a1586c7 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char *foo() {
char *result = getenv("HOME");
return strcat(result, "/foo");
}
int main() {
printf("%s\n", foo());
printf("%s\n", foo());
printf("%s\n", foo());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment