Oct 16, 2011

How to do C programs in Linux.

Many of us do not know to write C programs in Linux environment because we are more familiar with Windows. Never the less, here you will learn to write C in Linux environment.
Requirements
  1. Any Linux distributions installed (ex: Red hat, Fedora, Ubuntu etc.)
  2. Any text editor ex: Gedit.
  3. More importantly Gnu C Compiler i.e., GCC.
  4. The terminal.
Step1: Write the c program and save it as EXAMP.C in Home directory.
Step2: Open The Terminal.
Step3: Write as follows
GCC EXAMP.C
Now the c file has got compiled, loaded and linked and the executable file A.OUT is created.
Step4: To execute the program you have written just give.
./A.OUT
You will see the output of the program on the screen.
IF NOT CLEAR
JUST FOLLOW THE SNAP SHOTS SHOWN BELLOW.
AND Enjoy the programming