C · online compiler

Run C online

Run C online — real GCC, real memory. C90 through C23 in a Firecracker microVM.

Available versions
Firecracker microVM live per-test verdicts multi-file compile

C is still the substrate of modern computing: it is the language your kernel is written in, your database is written in, your interpreter for Python is written in. Learning C is learning what actually happens under the abstractions.

ls-judge compiles C with GCC and lets you pick the standard: strict C90 for teaching, C99/C11/C17 for practical work, C23 to explore the latest features (nullptr, typeof, #embed).

Every submission runs in its own Firecracker microVM — that is real kernel isolation, not a browser sandbox. Segfaults segfault, undefined behaviour is undefined. It is a genuine C environment.

Multi-file projects work: add your headers and .c files via the file panel and they will be passed to gcc together. Use the Tests tab to feed stdin fixtures and compare against expected output — verdicts stream back per case.

Starter code

What you get in C

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

c
C 23
#include<stdio.h>
int main(){int n;scanf("%d",&n);printf("%d\n",n*2);return 0;}
stdin →21
expected →42
FAQ

Common questions about C on ls-judge

Which C compiler and standards do you support?
GCC, with -std= flags for C90, C99, C11, C17 and C23 selectable from the version picker.
Can I use pthreads / networking?
pthreads yes. Networking no — the microVM's network namespace has no route out.
What is the memory limit per submission?
A few hundred MB in the default plan — enough for classroom problems and moderate LeetCode-style tasks.
Is stdin latched to the Test panel?
Yes — each test case's stdin field is what your program reads. Expected output is compared byte-for-byte after normalization.
Further reading
Also try