c

Compile and execute C code snippets directly without manual compilation

brewmacoslinux
Try with needOr install directly
Source

About

Compile and execute C "scripts" in one go

Commands

c

Examples

Execute a simple C script that prints hello world$ c 'int main() { printf("Hello World\n"); return 0; }'
Run C code from a file$ c < script.c
Execute C code with standard library functions$ c 'int main() { int sum = 0; for(int i=1; i<=10; i++) sum+=i; printf("%d\n", sum); return 0; }'