Do the following:
1) save the submitted text into a local file
2) run the C compiler on that file
3) zip the result
4) post that zip file to a public folder
5) provide the link to the published zip file
Details to be elaborated by you - access rights and security issues too...