Convert c to cgi

To my knowledge, a .cgi file is simply a .exe file with a different extension to indicate that it's used for web purposes. You simply have to compile it like any other program, but with a .cgi extension for the output.
 
You'd need to compile it to some kind of executable / binary first.

Then yeah, parameters, inputs, outputs.

The output to StdOut should be in HTML though.
StdErr I don't think gets output to the browser at the other end, but may be useful for logging on the server.

Make sure the code is 'tight'.