Skip to content

Playground

C playground

This compiles your C with the same real clang toolchain the C++ playground uses, so the warnings and errors are clang's own, and scanf really reads from the input box. How the sandbox works, and its honest limits, is on the code execution and security page.

clang via Emscripten 3.1.24 (2026-09-12 build)

Before you start: C uses the same heavy compiler as C++

C is compiled by the same real clang toolchain as the C++ playground, so it has the same costs, measured on our test machine:

  • Nothing downloads until you press the button. The first start downloads about 27 MB, and your browser keeps a copy for later visits.
  • The compiler is unpacked again on every page load. The first result arrived about 16 seconds after pressing the button; each run after that took about 2 to 4 seconds.
  • The default language standard is C17, and the toolchain is from late 2022 (Emscripten 3.1.24).
  • Some memory mistakes do not crash here. Reading through a null pointer printed a garbage number instead of stopping the program, because WebAssembly memory starts at address zero. On a real computer the same bug would usually crash, so a clean run here is not proof that pointer code is correct.
Ctrl/Cmd+Enter to run

Press Esc then Tab to move keyboard focus out of the code editor.

Ready
Output will appear here after you run your code.

Not sure what to type?

A blank editor is the hard place to start. The C exercises hand you a program that already runs and ask you to change one thing.