How to write, compile and run the C programming in unix environment:

C program supports various platforms and multiple compilers. Here we are going to explain how to use C programming basic programming in linux/unix environment by using gcc compiler.

I assume you have installed Linux Mint 17 Qiana with Mate desktop in you PC.

1. Start you PC and boot in Linux Mint 17

2. Open “Menu” in the bottom left corner of the window

3. Enter text in the “Search box”

4. You should see “Text Editor”. Select the “Text Editor”. This open the default Linux Mint text editor, “GEdit”

5. Type the following program

6. Save the program as “hello.c” Note down the location

7. Open file explorer from the taskbar at the bottom and navigate to the location of the program.

8. Right click in the explorer. Choose “Open in Terminal” option.

9. In the terminal enter the following command gcc hello.c -o hello this will compile your program “hello.c” to generate a executable (binary) “hello”

10. To run the generated executable enter ./hello Now you should see the “Hello world!” output