Quantcast
Channel: E Notes » PROGRAMMING IN C++
Viewing all articles
Browse latest Browse all 10

Begnning with c++

$
0
0

CONTENTS 
- What is C++?
- Applications of C++.
- Simple Program Features.
- Comments
- Output Operator

-Header Files
- Return Type of main( )
- More C++ Statements
- An example With Class
- Structure of C++ Program

What is C++?
- It is an object oriented programming.
- It is the super set of c.
- It has bottom-up approach.
- Applications:

Simple C++ program
- #include< iostream.h >
#include< conio.h >
int main( )
{
cout<<“c++ is better than c”<<endl;
getch( );
return 0;
}

Comments
- C++ introduced a new comment symbol
//(back slash).
- It is of 2 types:-
1. Single line comments
2. Multi line comments

Input & Output Operator
- The operator >> is called the extraction operator. It is
used for output.
-  The operator << is known as insertion operator. It is
used for input .

Header Files
- <stdio.h>
- <iostream.h>
- <stdlib.h>
- <string.h>
- <time.h>
- <iomanip.h>
- <fstream>

 

Namespace
- All classes and functions are declared within
namespace.
- Using namespace specifies that the members
defined in std are used throughout
the program.

 

Return Type of main( )
- By default the return type of main( ) is integer.

- Therefore the return type of all functions
in c++ is int.

More C++ Statements
- Variables
- Cascading of I/O operator

 

Structure of C++ Program
*Include files
*Class declaration
*Member functions definition
*Main function program

 

References
- Book:-Object oriented programming with C++
-Author name:- E Balagurusamy
-Edition:- Second
-Chapter- Second
-Page no:- form 17-29

 


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images