open a terminal.

mkdir -p /projects/c/HelloWorld; # create a directory for the project
cd /projects/c/HelloWorld; # enter that directory
vim HelloWorld.c; # create file

# fill it with this

#include <stdio.h>

main()
{
printf("Hello, world!\n");
return 0;
}

# compile it (cc instead of gcc also works)

gcc HelloWorld.c -o HelloWorld.bin;

# you should get a runnable binary file HelloWorld.bin, that you can run like this

./HelloWorld.bin; # run the binary file

# the output should be
Hello, world!

CONGRATULATIONS! YOU JUST CREATED YOUR FIRST LINUX C PROGRAM! 🙂 AND IT’S FUCKING FAST! 😀

Now continue to part two: fist gui app in gnome

admin