Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding C compiler to a webpage

I am developing a site for online C coding competition. The coding will be done in an editor that will be embedded in the webpage, and this must also be able to compile the program online. Is there any available compiler that can be embedded in the webpage? The server can be either linux or windows server. If anyone has any idea please share.

like image 549
Dolphin Avatar asked Aug 04 '11 10:08

Dolphin


People also ask

How can I add C compiler to my website?

Step 1: Open the website JDoodle.com and sign in, if you don't have an account then you must register first. Step 2: Select any one programming language and write your code and save it. Click on editable share and copy the embed URL.

What is JDoodle used for?

JDoodle is an online programming platform where you can learn, teach, practice, develop, assess and collaborate. JDoodle aims to be a one-stop shop for anything programming.


1 Answers

Well, you can always write a script that invokes an installed compiler through system() commands. Although you want to be very, very careful as this can be very dangerous. For example if you do not sanitize your input, then someone could inject commands which intentionally crash/damage your system.

like image 132
Waleed Amjad Avatar answered Sep 26 '22 10:09

Waleed Amjad