COnline C Compiler
main.cPress Run or Ctrl + Enter.
Write and run C programs online — printf, scanf, loops, arrays, functions and pointers. Free and instant; your code runs on your device.
How it works
Step 1
Write or paste
Type C code or paste it in. It is kept on this device for next time.
Step 2
Run
Press Run or Ctrl + Enter. Answers for input go in the Input box.
Step 3
See the output
Output, errors with their line number, and how long it took.
Tips for C
- scanf() reads from Input, one value per line or separated by spaces.
- Supported headers: stdio.h, stdlib.h, string.h, math.h, ctype.h and time.h.
- This is a teaching-level runner: loops, arrays, functions, pointers and structs work.
Questions
How do I run a C program online?
Write or paste your program with a main() function and press Run. printf output appears on the right.
How does scanf work here?
Tap Input and type the values before you press Run — one per line or separated by spaces.
Which headers can I use?
stdio.h, stdlib.h, string.h, math.h, ctype.h and time.h. This runner is made for learning and practice; programs that need other libraries or files won’t run.
Is my code uploaded?
No. It runs in your browser and is saved only on this device.