Posted By:
1 Jul, 2013 9:58 am PDT

Basic program in C/C++.

Once you have installed the C++ compiler, let us check whether it is working by compiling and executing a basic program.

Open the compiler and type the following code:

//To print hello world:


/* Program to print Hello World */



int main()


    cout<<"\n Hello world";





  1. Save the above code as hello.cpp.
  2. Compile the code and then run it.
  3. You should get the following output: Hello World
Was it useful?  

Please login to reply to this problem.