This is a dumb(cute) hack to compile a simple program directly, without editing and managing the source code in a file.
Created
November 19, 2022 18:55
-
-
Save karlredgate/d58ecebfa64298a53d3a71b5eec89c5d to your computer and use it in GitHub Desktop.
Compile a Quick C Program without Editing
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
ln -s /dev/tty foo.c | |
cc foo.c | |
#include <stdio.h> | |
int main() { printf("hello\n"); } | |
^D | |
./a.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment