First C Program
To create your first C Program, open any text editor, copy and paste the following code
1 2 3 4 5 |
#include <stdio.h> 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
1 |
gcc -o hello hello.c |
Make the program executable with
1 |
chmod 755 hello |
To run
1 |
./hello |