Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming....
Transcript of Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming....
![Page 1: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/1.jpg)
Beginning with C++
By Hardeep Singh
By Hardeep Singh
![Page 2: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/2.jpg)
Contents
What is C++?
Applications of C++.
Simple Program Features.
Comments
Output Operator
By Hardeep Singh
![Page 3: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/3.jpg)
Contents Conti..
Header Files
Return Type of main( )
More C++ Statements
An example With Class
Structure of C++ Program
By Hardeep Singh
![Page 4: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/4.jpg)
What is C++?
It is an object oriented programming.
It is the super set of c.
It has bottom-up approach.
Applications:-
By Hardeep Singh
![Page 5: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/5.jpg)
Simple C++ program
#include< iostream.h >
#include< conio.h >
int main( )
{
cout<<“c++ is better than c”<<endl;
getch( );
return 0;
}
By Hardeep Singh
![Page 6: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/6.jpg)
Comments
C++ introduced a new comment symbol
//(back slash).
It is of 2 types:-
1. Single line comments
2. Multi line comments
By Hardeep Singh
![Page 7: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/7.jpg)
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 .
By Hardeep Singh
![Page 8: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/8.jpg)
Header Files
<stdio.h>
<iostream.h>
<stdlib.h>
<string.h>
<time.h>
<iomanip.h>
<fstream>
By Hardeep Singh
![Page 9: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/9.jpg)
Namespace
All classes and functions are declared within
namespace.
Using namespace specifies that the members
defined in std are used throughout
the program.
By Hardeep Singh
![Page 10: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/10.jpg)
Return Type of main( )
By default the return type of main( ) is integer.
Therefore the return type of all functions
in c++ is int.
By Hardeep Singh
![Page 11: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/11.jpg)
More C++ Statements
Variables
Cascading of I/O operator
By Hardeep Singh
![Page 12: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/12.jpg)
Structure of C++ Program
Include files
Class declaration
Member functions definition
Main function program
By Hardeep Singh
![Page 13: Beginning with C++ By Hardeep Singh - Cloud Object Storage · It is an object oriented programming. ... in c++ is int. By Hardeep Singh . ... -Object oriented programming with C++](https://reader030.fdocuments.us/reader030/viewer/2022021616/5b2f94cd7f8b9adc6e8d6ebd/html5/thumbnails/13.jpg)
References
Book:-Object oriented programming with C++
Author name:- E Balagurusamy
Edition:- Second
Chapter- Second
Page no:- form 17-29
By Hardeep Singh