Last active
December 31, 2015 07:39
-
-
Save zmughal/7955761 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* see <http://stackoverflow.com/questions/1694164/is-errno-thread-safe> */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define mem (*set_it()) | |
int memory; | |
int* set_it() { | |
return &memory; | |
} | |
int main() { | |
mem = 2; | |
printf("mem: %d\n", mem); | |
mem = 4; | |
printf("mem: %d\n", mem); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment