Been playing around with my Raspberry Pi 4 which I’ve installed in a great retro looking desktop case. Anyway I’ve never written anything in C for the Pi so though I’d have a go putting out the classic ‘Hello World’
To compile, I’ll assume you have already install a C compiler.
scott@raspberrypi ~/src/c $ gcc -o hello hello.c
Execute with ./hello
// Simple Hello World written in C for the Raspberry Pi
#include <stdio.h>
main () {
printf("Hello World\n");
}