Monday, December 26, 2011

Steps to Compile a C- program in Linux

To compile C program first.c, and create an executable file called first, enter:


$ gcc first.c -o first


OR


$ cc first.c -o first

To execute program first, enter:


$ ./first


Output:

My first C program

No comments: