Starting c/c++ programming in Linux.

So, guys this post is just a kick off to my blog.

This post is about coding in c or c++ in Linux . So, if you are a beginner looking to get your hand on coding in c or c++ in Linux, this will be of great help.

STEPS:

1.You can use gedit or i recommend you download Sublime Text for Linux.

2. Select your language as c/c++ and code and save the file.

3. Open the terminal and use cd (change directory ) command to get to the directory in which you have saved your program .

4. Now, type ” gcc  -o name name.c” and hit enter. This will create the object code of your program and compile it and reports the error( if any )  which can be read by your computer,

5.To run your program ,type “./name”. And hit enter.

6. And you are done.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s