Masputrawae

Program Pertama di C

Buat File hello.c

1vim hello.c

Tulis Program

1#include <stdio.h> // Panggil library dasar untuk input/output
2
3int main() {
4    printf("Hello World!"); // Cetak Hello World! Ke layar 
5    return 0; // Program selesai tanpa error
6}

Compile

1gcc hello.c -o hello

Jalankan

1./hello