A web-based tool that allows users to compile and execute C programs, interact with them via a terminal-like interface, and export the code along with the output to a well-formatted PDF.
- Upload
.c
files via a simple web interface. - Compile C code using
gcc
with error feedback if compilation fails. - Terminal-like interface for runtime input and real-time output.
- Export a PDF that includes:
- Student name, roll number, and date
- The original C source code
- The output of the program
- Proper formatting with a two-column layout
- Page numbers on each page
- Automatic deletion of temporary files after usage.
- Upload a
.c
file. - The server compiles the file using GCC.
- If compilation is successful, a terminal session is created using a pseudo-terminal.
- Input is sent from the browser to the process, and output is streamed back.
- Once the output is ready, a PDF can be generated with all the content.
- PDF is served for download and deleted after delivery.
- All
.c
and.out
files are removed after PDF generation to ensure cleanup.
- Backend: Python, Flask, Flask-SocketIO, Eventlet
- Frontend: HTML, JavaScript, Socket.IO
- PDF Generator: ReportLab
- Compiler: GCC
- Hosting: Render.com