Running C in Zerethon IDE

How Run compiles your project with gcc, the flags it uses, the time limit, input and tests.

Runs in Zerethon IDE · C (GCC 14) Official C documentation ↗
  • Run (Ctrl/⌘+Enter) compiles the entry — main.c by default — with the project's other sources: gcc -std=gnu17 -O1 -Wall -Wextra … -lm, then runs the program. Make another file the entry with the ▶ button next to it in the explorer.
  • A compile or link error stops the run with “Compilation failed · nothing was run”; warnings are shown but do not stop it.
  • A run is stopped after 15 seconds (compiling included). Memory is limited, there is no network, and project files are read-only (write to /tmp).
  • Run tests (Ctrl/⌘+Shift+Enter) builds and runs every test_*.c program (each linked with the other sources). A test passes when it exits with 0.
test_geometry.c
#include <assert.h>
#include <stdio.h>
#include "geometry.h"

int main(void) {
    assert(area(2, 3) == 6);
    assert(area(0, 5) == 0);
    puts("geometry ok");
    return 0;
}
A test for geometry.c from “Header files and several sources”. A failed assert aborts the program, which fails the test.