sometimes we need to run the C programs in the Linux Box,
Today i am showing you people how to run an “C language program” from the Linux System.
In linux we can use the gcc command to run C programs
Most of the time by default the gcc installed in the linux.
Type the following command to verify the gcc is installed :
To find the version of the gcc
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Writing first program:
Open the vi editor
and type the following lines of code
Compile the program and make executable
$gcc Hello.c -o Hello
To execute the program