Compile

Compile short C programs on the fly at the command prompt

echo 'main() { printf("Hello world!\n"); }' | gcc -w -x c - -o hello
echo '#include <stdio.h>
int fibonacci(int n){return n<2?n:fibonacci(n-1)+fibonacci(n-2);}
int main(){printf("%d\n",fibonacci(19));return 0;}' | gcc -x c - -o fib19

Unknown's avatar

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment