jdfstrom / bash-c

Isn't it funny how # is used to start comments in bash, but used to mark pragmas in c? What if this was abused to produce valid c programs whose source code is a bash script that does the same thing?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bash-c

Isn't it funny how # is used to start comments in bash, but used to mark pragmas in c? What if this was abused to produce valid c programs whose source code is a bash script that does the same thing?

  • hello_world.c: A simple "hello world" program. Takes no input. Prints "Hello, World!" to the console.
  • hello.c: A slightly more complicated program. Takes a command from the command line and prints "Hello, !" to the console.
  • fib.c: Takes an integer, n, from the command line args and prints the nth fibonacci number.

About

Isn't it funny how # is used to start comments in bash, but used to mark pragmas in c? What if this was abused to produce valid c programs whose source code is a bash script that does the same thing?


Languages

Language:C 100.0%