Hello Friends,
Today i am going to share this tutorial for newbie linux users, for C Programming.
i am using Ubuntu Os, First of all we Need
1. Editor - to write and edit Programming code
2. A C Compiler On Linux OS To Compile Code
You can install g++ (c compiler) by using following code in terminal
Lets start writing code, we need editor
Need a Text Editor gedit, Open by Termina just write gedit and press return key.
Write your Code Here..
/* Below code for hello world, */
#include
int main()
{
printf("hello world\n");
return 0;
}
/* Save Code with some name.c ex. hello.c */
** note the location where you are saving code, and change dir. from terminal to compile
else it will show error No Such file or directory ;)
Lets Compile the code, by using terminal
To Run this output file using terminal use following lines in terminal
Today i am going to share this tutorial for newbie linux users, for C Programming.
i am using Ubuntu Os, First of all we Need
1. Editor - to write and edit Programming code
2. A C Compiler On Linux OS To Compile Code
You can install g++ (c compiler) by using following code in terminal
sudo apt-get install g++
Lets start writing code, we need editor
Need a Text Editor gedit, Open by Termina just write gedit and press return key.
Write your Code Here..
/* Below code for hello world, */
#include
int main()
{
printf("hello world\n");
return 0;
}
/* Save Code with some name.c ex. hello.c */
** note the location where you are saving code, and change dir. from terminal to compile
else it will show error No Such file or directory ;)
Lets Compile the code, by using terminal
g++ hello.c -o output //output is the executable filename after compile the codes
To Run this output file using terminal use following lines in terminal
./output
No Comment to " In Linux C Programming Tutorial Using G++ "