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

Advertisement

gcc -o hello hello.c

Make the program executable with

chmod 755 hello

To run

./hello
Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement