Online C Compiler
Write and run C programs in your browser. printf and scanf work in a real terminal, and you get a debugger, file handling and the conio.h and graphics.h headers older courses still use.
- Free
- Nothing to install
- No sign-up
- Debugger
- Terminal
- IntelliSense
Run opens your code in the VUBuddy Playground in a new tab, with a terminal and a debugger.
A complete C setup in one tab
Real input with scanf
Your program stops and waits for you to type, like it does on your own computer.
Files and the standard library
Read and write text files, sort with qsort and use string.h, math.h and stdlib.h.
conio.h and graphics.h
Run Turbo C-style programs that use getch(), clrscr() or graphics.h.
Debugger
Breakpoints, step-by-step execution and a live view of your variables.
IntelliSense
Function suggestions and error underlines while you type.
Multi-file projects
Keep functions in separate .c and .h files when a program grows.
How to run a C program online
-
1
Write your program in
main.cabove. - 2 Press Run or Ctrl+Enter to compile and run it.
- 3 Type any input in the terminal and press Enter.
- 4 Add more files in the playground, or start from an example.
Example C programs to start from
First Steps in C
A menu of six small programs: grades, leap years, tables, averages, primes and a guessing game.
Open in PlaygroundExpense Diary
Track spending in a text file: add, delete, sort with qsort, monthly lists and a report file.
Open in PlaygroundKite Flying
Your first graphics.h program: a kite drifts over Lahore rooftops at dusk.
Open in PlaygroundSorting Visualizer
Watch five sorting algorithms rearrange the same bars, one comparison at a time.
Open in PlaygroundOnline C compiler or install one?
| Feature | Installing a C compiler (Dev-C++, Code::Blocks or MinGW) | VUBuddy Playground |
|---|---|---|
| Setup | Download, install and sometimes set PATH | Opens in a few seconds |
| Works on | Usually Windows-only installers | Any modern browser |
| Turbo C headers | conio.h and graphics.h need extra setup | Built in |
| Debugger | Depends on the IDE | Included |
| Cost | Free | Free |
Practising C for CS201 or CS604?
Use this page for C-style exercises, and the C++ compiler for CS201 and CS304 assignments. CS604 (Operating Systems) students can practise Linux commands in the terminal that comes with every project.
Keyboard shortcuts
| Action | Shortcut |
|---|---|
| Compile and run | Ctrl+Enter |
| Start debugging or continue | Ctrl+\ |
| Toggle breakpoint | Ctrl+B |
| Step over | Ctrl+' |
| Step into | Ctrl+; |
| Step out | Ctrl+Shift+; |
| Stop debugging | Ctrl+Shift+\ |
On a Mac, use ⌘ in place of Ctrl. Run and debugging never use F-keys, because browsers keep them for themselves.
Questions about the online C compiler
How do I run a C program online?
Write your code in the editor, press Run or Ctrl+Enter, and the output appears in the terminal. Type any input there too.
Does scanf work in this online C compiler?
Yes. The program waits for you to type in the terminal, just like a desktop compiler.
Can I run Turbo C programs online?
Programs that use conio.h and graphics.h run here. Very old Turbo C code that depends on other DOS-only headers may need small changes.
What's the difference between the C and C++ compilers here?
They use the same editor. This page starts a .c project compiled as C, and the C++ page starts a .cpp project. You can switch any time with the Start from menu.
Is there a debugger?
Yes: breakpoints, stepping and variable inspection.
Is it free?
Yes, completely free. There's no sign-up and no account: open the page and start coding.
More free coding tools
Dev-C++, Apache NetBeans, Java and other names are trademarks of their owners. VUBuddy Playground is not affiliated with them.