Table des matières

, ,

Langage C sans compiler - Script en C

Classique

hello.c

#include<stdio.h>
 
int main(void)
{
        puts("Hello world !");
        return 0;
 
}
gcc hello.c
./a.out
Hello world !

Autre façon

sudo apt-get install tcc
tcc -run hello.c

Ou encore on peut ajouter un shebang mais le fichier ne sera plus conforme au langage C.

hello.c

#! /usr/bin/tcc -run
 
#include<stdio.h>
 
int main(void)
{
        puts("Hello world !");
        return 0;
 
}