c and c++ programming in ubuntu 10.04

c and C plus plus programming on Ubuntu-linux

When it comes to programming(C/C++ or other ),Ubuntu 10.04 or any distribution of Linux is far better than Windows NT based Operating system(windows XP or Vista or 7).In general people uses TurboC++ on windows but in Ubuntu 10.04 advanced and much efficient compiler are available for compiling C or C++ programs.Some people or students think that programing in Linux is very tough(Actually they feel scary due to the shell Commands) but I assure you that it is nothing but a misconception.But now,I think the misconceptions are decreasing and they are becoming familiar with Ubuntu/linux environment.

Text Editor in Ubuntu 10.04
Since Ubuntu 10.04 uses GNOME as their default desktop so there is no need to worry about text editor because Gedit text editor is installed by default.It has many advanced features like Syntax coloring so it is well suited for programming.Another KDE based version is also available Kwrite,similar to gedit with lot of features.

C Compiler for Ubuntu 10.04

For C program there is a modern compiler GCC(GNU Compiler Collection) which you can use to compile C programs.To install gcc type following command at command line.(It may be installed already)
sudo apt-get install gcc

Compiling C program in Ubuntu 10.04
user1004@user1004-desktop:~/Desktop$ gcc abc.c
user1004@user1004-desktop:~/Desktop$ ./a.out

*********Hello! Mr.X it’s working Enjoy!!******

C++ Compiler for Ubuntu
For C++ programs you can use G++ compiler an advanced compiler with lot of features.To install G++ type following command at command line.
sudo apt-get install g++

Compiling C++ program in Ubuntu 10.04
user1004@user1004-desktop:~/Desktop$ g++ decbin2.cpp
user1004@user1004-desktop:~/Desktop$ ./a.out

Enter the decimal number to be converted
The Equivalent binary number is     010111

IDE(Integrated Developement Environment) for programming in C and C++
For programming in c++ these are the most widely used IDE’s

  • Kdevelop
  • Eclipse
  • Frama C
  • Anjuta

More details on available IDE on Ubuntu-Linux

  • Pingback: Tweets that mention c and c++ programming in ubuntu 10.04 | Sudobits Blog | Hack to Learn -- Topsy.com()

  • http://kevinrodrigues.com/blog Kevin Rodrigues

    I think that we should be programming on as many operating systems as possible because it just increases our experience in programming with the different tools and API available.

    Visual Studio is a far better IDE for programming than Eclipse. However every programming student should begin with programming on any Linux system with gcc, text editor, gdb because we get to learn a lot many things which IDE tend to hide.

    • http://sudobits.com rkjha

      Thanks Mr. Kevin…

  • mCorridor

    Just what i’m looking for! ^^