Created
April 2, 2011 08:36
-
-
Save seungwon0/899335 to your computer and use it in GitHub Desktop.
Print the source code of itself
This file contains 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
/* | |
* print-source.c - Print the source code of itself | |
* | |
* print-source prints the source of itself without using file I/O. | |
* | |
* http://www.indidev.net/forum/viewtopic.php?p=150 | |
* | |
* Seungwon Jeong <[email protected]> | |
* | |
* Copyright (C) 2011 by Seungwon Jeong | |
*/ | |
#define P(x) int main(void) { puts(#x); puts("P(" #x ")"); return 0; } | |
P(#define P(x) int main(void) { puts(#x); puts("P(" #x ")"); return 0; }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment