If you are looking to start C programming in Linux, all you need is to check whether you have C compiler is installed in your linux or not.To check type gcc in the terminal, if it says, gcc:no input files it means you have C compiler installed in your system. GCC is a C compiler in Linux. Like Turbo C and Borland C is there for Windows.
Lets start with a very simple programe to print Hello world ! type the following lines,
-----------------------------------
#include
main()
{
printf("Hello world !");
return 0;
}
--------------------------------
Type these lines in any of the text editor you are suitable with, dont forget to save the file with extn name e.g. hello.c, avoid saving file with test.c
To compile your programe type gcc -o hello hello.c if it shows no error you may run your programe by simply typing ./hello
Now you are ready to start your programming
2 comments:
Thanks bro, It saved my lot of time...
It was really very very helpful for the linux beginners who wants C programming in Linux.
Post a Comment