Note: if GCC is not available in your Ubuntu Linux machine install by using below command
$sudo apt-get install gcc-4.9
Here 4.9 is GCC version
Similarly for installing vim
$ sudo apt-get install vim
Below are the steps we have to follow for compiling a c programming file on Linux(Ubuntu):
1) create a .c file using the below command
$vim demo_prog.c
2) write some logic based on your requirement and save using by pressing escape key and type " :wq "
3) compile the demo_prog.c using GCC
$gcc demo_prog.c
4) if no syntax errors in your demo_prog.c file then GCC compiler creates a.out file.
5) run a.out file
$./a.out