Tuesday, 6 June 2017

Structure of Program

Hello Friends,
Today i am sharing the structure of program with all of you.
/*This Program prints Hello World on screen*/
#include<iostream>
int main (){
cout<<"Hello World";
return 0;
}

  • 1. /* This Program....*/
            The symbols /* and */ used for comment.
           This Comments are ignored by compiler and are used to provide useful information about       
           program to humans who use it.

  • 2. #include <iostream.h>
   This is a preprocessor command which tells compiler to include iostream.h file.

  • 3. using namepace std;
   All the elements of the standard C++ library are declared within what is called a namespace, the namespace with the name std. So in order to access its functionality we declare with this expression that we will be using these entities.

  • 4. main ()
C++ programs consist of one or more functions. There must be one and only one function called main.

  • 5. {}
braces surround the body of the function,which may have one or more instructions/statements.

  • 6. Cout<<
it is a library function that is used to print data on the user screen.

  • 7. "Hello World" is a string that will be displayed on user screen.

  • 8.return 0; return the value zero to the operating system.

I hope you like it .
Thank You

No comments:

Post a Comment

Structure of Program

Hello Friends, Today i am sharing the structure of program with all of you. /*This Program prints Hello World on screen*/ #include<io...