Web-based C compiler

Web-based C compiler#

Details

The following editor could be useful if you have problems with your local installation or would like to test something.

For full-screen, use compiler-explorer.com. To have the same layout when you use the site for the first time:

  1. When you arrive, you should see a C++ source on the left and a gcc compiler assembler output on the right.

  2. On the left tab (editor) – change the language from C++ to C.

  3. Close the right tab completely.

  4. Click on ➕ Add new... on the editor under the C source #1. A menu with Compiler, Execution Only, etc should pop up.

  5. Click on Execution Only. A new tab Executor ... will be opened.

  6. Move one tab in such a way that you have one tab on the left and one on the right.

  7. On the Executor tab, change the compiler to x86-64 clang (trunk).

You will get an error with the default code, because a C program requires the main function to be compiled as an executable.

You can save/load your code locally using 💾 Save/Load

The following frame may set cookies in your browser and the code you write is sent to Compiler Explorer’s servers for hashing and/or compilation and/or running. Refer to their cookie and privacy policy.