First C Program

To create your first C Program, open any text editor, copy and paste the following code

#include 

int main() {
        printf ("Tis is my C program");
}

Save it as hello.c

Before you can run this program, you need to compile it. To compile run

gcc -o hello hello.c

Make the program executable with

chmod 755 hello

To run

./hello

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *