SlideShare a Scribd company logo
45 Days C++ Programming Language Training in Ambala
45 Days C++ Programming
Training In Ambala
www.batracomputercentre.com
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
Introduction To C++
• C++ is a middle-level programming language
developed by Bjarne Stroustrup starting in
1979 at Bell Labs. C++ runs on a variety of
platforms, such as Windows, Mac OS, and the
various versions of UNIX.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
History of C++
• C++ Development started in 1979.During the creation of Ph.D.
thesis, Bjarne Stroustrup worked with language called Simula.
• Bjarne Stroustrup identified that this OOP features can be
included in the software development
• C++ is also called as C with classes
• Stroustrup states that the purpose of C++ is to make writing good
programs easier and more pleasant for the individual
programmer.
• After that Bjarne Stroustrup started working on the C language
and added more extra OOP features to the classic C.He added
features in such a fashion that the basic flavor of C remains
unaffected.
• C++ programming language is extension to C Language. In C we
have already used increment operator (++). Therefore we called
C++ as “Incremented C” means Extension to C.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Characteristics Of C++
• C++ Provides huge Function Library that’s why its
popularity is increasing day by day and more
programmers are inclining towards C++ due to its
multiple features –
• C++ is an Object Oriented Programming
Language (OOPL).
• C++ have huge Function Library
• C++ is highly Flexible language with Versatility.
• C++ can be used for developing System Software viz.,
operating systems, compilers, editors and data bases.
• C++ is suitable for Development of Reusable Software.
, thus reduces cost of software development.
• C++ is a Machine Independent Language.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Features Of C++
1. Objects
2. Classes
3. Abstraction
4. Encapsulation
5. Inheritance
6. Overloading
7. Exception Handling
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Objects
• Objects are the basic unit of OOP. They are
instances of class, which have data members
and uses various member functions to
perform tasks.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Classes
• Class can also be defined as user defined
data type but it also contains functions in it.
So, class is basically a blueprint for object. It
declare & defines what data variables the
object will have and what operations can be
performed on the class's object.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Abstraction
• Abstraction refers to showing only the
essential features of the application and
hiding the details. In C++, classes provide
methods to the outside world to access & use
the data variables, but the variables are
hidden from direct access. This can be done
access specifiers.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Encapsulation
• It can also be said data binding.
Encapsulation is all about binding the data
variables and functions together in class.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Inheritance
• Inheritance is a way to reuse once written
code again and again. The class which is
inherited is called base calls & the class which
inherits is called derived class. So when, a
derived class inherits a base class, the
derived class can use all the functions which
are defined in base class, hence making code
reusable.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Overloading
• It is a feature, which lets us create functions
with same name but different arguments,
which will perform differently. That is
function with same name, functioning in
different way. Or, it also allows us to redefine
a function to provide its new definition. You
will learn how to do this in details soon in
coming lessons.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Variables In C++
• A variable provides us with named storage that our
programs can manipulate.
• Each variable in C++ has a specific type, which
determines the size and layout of the variable's
memory.
• the range of values that can be stored within that
memory;
• the set of operations that can be applied to the
variable.
• The name of a variable can be composed of letters,
digits, and the underscore character.
• It must begin with either a letter or an underscore.
• Upper and lowercase letters are distinct because C++
is case-sensitive.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Constants In C++
• Constants refer to fixed values that the
program may not alter and they are
called literals.
• Constants can be of any of the basic data
types and can be divided into Integer
Numerals, Floating-Point Numerals,
Characters, Strings and Boolean Values.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
1) User Defined Data
Types
• These are the type, that user creates as a
class. In C++ these are classes where as in C it
was implemented by structures.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
a) Structures
• Structure is the collection of variables of different
types under a single name for better visualization of
problem and can hold data of one or more types.
• The struct keyword defines a structure type
followed by an identifier(name of the structure).
Then inside the curly braces, you can declare one or
more members (declare variables inside curly
braces) of that structure. For example:
struct person { char name[50]; int age; float salary;
};
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
b) Unions
• Unions allow one portion of memory
to be accessed as different data
types. Its declaration and use is
similar to the one of structures, but
its functionality is totally different.
For Example:
union type_name { member_type1
member_name1; member_type2 member_name2;
member_type3 member_name3; . . }
object_names;
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
c) Enumeration
Enumerated types are types that are defined
with a set of custom identifiers, known
as enumerators, as possible values. Objects
of these enumerated types can take any of
these enumerators as value.
Their syntax is:
This creates the type type_name, which can
take any of value1, value2, value3, ... as value.
Objects (variables) of this type can directly
be instantiated as object_names.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
d) Class
• C++ offers a new user-defined data type
known as class, which forms the basis of
object-oriented programming. A class acts as
a template which defines the data and
functions that are included in an object of a
class. Classes are declared using the keyword
class. Once a class has been declared, its
object can be easily created.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
2) Built In Data Type
• The basic (fundamental) data types provided by
C++ are integral, floating point and void data
type. Among these data types, the integral and
floating-point data types can be preceded by
several type modifiers.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
a) Int
• Numbers without the fractional part
represent integer data. In C++, the int data
type is used to store integers such as 4, 42,
5233, -32, -745. Thus, it cannot store
numbers such as 4.28, -62.533.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
b) Char
• Characters refer to the alphabet, numbers
and other characters (such as {, @, #, etc.)
defined in the ASCII character set. In C++, the
char data type is also treated as an integer
data type as the characters are internally
stored as integers that range in value from -
128 to 127
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
c) Float
• A floating-point data type is used to store
real numbers such as 3 .28, 64. 755765, 8.01,
-24.53. This data type includes float and
double' data types.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
3) Derived Data Types
• Data types that are derived from the built-in
data types are known as derived data types.
The various derived data types provided by
C++ are arrays, functions, pointers and
references.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
a) Array
• An array is a set of elements of the same data
type that are referred to by the same name.
All the elements in an array are stored at
contiguous memory locations and each
element is accessed by a unique index or
subscript value. The subscript value indicates
the position of an element in an array.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
b) Functions
• A function is a self-contained program
segment that carries out a specific well-
defined task. In C++, every program contains
one or more functions which can be invoked
from other parts of a program, if required.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
c) Pointers
• A pointer is a variable that can store the
memory address of another variable.
Pointers allow to use the memory
dynamically. That is, with the help of
pointers, memory can be allocated or de-
allocated to the variables at run-time, thus,
making a program more efficient.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
d) References
• A reference is an alternative name for a
variable. That is, a reference is an alias for a
variable in a program. A variable and its
reference can be used interchangeably in a
program as both refer to the same memory
location
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Loops in C++
1. Loop control statements change execution
from its normal sequence. When execution
leaves a scope, all automatic objects that
were created in that scope are destroyed.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Loop Type Description
For Loop
Execute a sequence of statements
multiple times and abbreviates the code
that manages the loop variable.
While Loop
Repeats a statement or group of
statements while a given condition is
true. It tests the condition before
executing the loop body.
Do while loop
Like a while statement, except that it
tests the condition at the end of the loop
body
Nested Loops
You can use one or more loop inside any
another while, for or do..while loop.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Decision Making Statements
• Decision making structures require that the
programmer specify one or more conditions
to be evaluated or tested by the program,
along with a statement or statements to be
executed if the condition is determined to be
true, and optionally, other statements to be
executed if the condition is determined to be
false.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Statements Description
If Statement
An if statement consists of a boolean
expression followed by one or more
statements.
If… Else Statement
An if statement can be followed by an
optional else statement, which
executes when the boolean expression
is false.
Switch Statements
A switch statement allows a variable to
be tested for equality against a list of
values.
Nested if statements
You can use one if or else if statement
inside another if or else if statement(s).
Nested Switch
Statements
You can use one switch statement
inside another switch statement(s).
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Basic Input/output
• The C++ standard libraries provide an extensive set of
input/output capabilities which we will see in
subsequent chapters. This chapter will discuss very
basic and most common I/O operations required for
C++ programming.
• C++ I/O occurs in streams, which are sequences of
bytes. If bytes flow from a device like a keyboard, a
disk drive, or a network connection etc. to main
memory, this is called input operation and if bytes
flow from main memory to a device like a display
screen, a printer, a disk drive, or a network
connection, etc, this is called output operation.
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Output Stream
The predefined object cout is an instance
of ostream class. The cout object is said to be
"connected to" the standard output device, which
usually is the display screen. The cout is used in
conjunction with the stream insertion operator,
which is written as << which are two less than
signs as shown in the following example.
cout << "Value of str is : " << str << endl;
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Input Stream
The predefined object cin is an instance
of istream class. The cin object is said to be
attached to the standard input device, which
usually is the keyboard. The cin is used in
conjunction with the stream extraction
operator, which is written as >> which are two
greater than signs as shown in the following
example.
cin >> name;
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
C++ Programming
Language
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.comwww.batracomputercentre.com
C++ Programming Language
• Introduction
• Classes, Objects
• Inheritance
• Polymorphism
• Overloading
• Encapsulation
• Constructor &
Destructor
• Function
• Pointers Structure
• Arrays & Strings
• Structures, Union
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com
SCO-15 Dayal Bagh,
Near Panchmukhi Hanuman Mandir,
Ambala Cantt- 133001
Haryana
Ph. NO. : 4000670, 97296666770
www.batracomputercentre.com
info.jatinbatra@gmail.com
www.batracomputercentre.com
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
Email id: info.jatinbatra@gmail.com Ph. No.: 9729666670, 4000670
www.batracomputercentre.com

More Related Content

What's hot (20)

PPT
Basics of c++ Programming Language
Ahmad Idrees
 
PPTX
Tokens expressionsin C++
HalaiHansaika
 
PDF
C++ Tokens
Amrit Kaur
 
PPTX
Presentation on C++ Programming Language
satvirsandhu9
 
PPTX
Learning C++ - Introduction to c++ programming 1
Ali Aminian
 
PPS
C++ Language
Vidyacenter
 
PDF
Introduction to cpp
Nilesh Dalvi
 
PDF
Intro to C++ - language
Jussi Pohjolainen
 
PPT
C++ programming program design including data structures
Ahmad Idrees
 
PPT
C++ Language
Syed Zaid Irshad
 
PPTX
C++ theory
Shyam Khant
 
PPTX
basics of c++
gourav kottawar
 
PDF
C++ book
mailmerk
 
PPT
Basic concept of c++
shashikant pabari
 
PPTX
Object Oriented Programming with C++
Rokonuzzaman Rony
 
PDF
Managing I/O in c++
Pranali Chaudhari
 
PPTX
C introduction by thooyavan
Thooyavan Venkatachalam
 
DOCX
C cheat sheet for varsity (extreme edition)
Saifur Rahman
 
PPTX
Introduction to C++
Sikder Tahsin Al-Amin
 
PPTX
C++ Overview PPT
Thooyavan Venkatachalam
 
Basics of c++ Programming Language
Ahmad Idrees
 
Tokens expressionsin C++
HalaiHansaika
 
C++ Tokens
Amrit Kaur
 
Presentation on C++ Programming Language
satvirsandhu9
 
Learning C++ - Introduction to c++ programming 1
Ali Aminian
 
C++ Language
Vidyacenter
 
Introduction to cpp
Nilesh Dalvi
 
Intro to C++ - language
Jussi Pohjolainen
 
C++ programming program design including data structures
Ahmad Idrees
 
C++ Language
Syed Zaid Irshad
 
C++ theory
Shyam Khant
 
basics of c++
gourav kottawar
 
C++ book
mailmerk
 
Basic concept of c++
shashikant pabari
 
Object Oriented Programming with C++
Rokonuzzaman Rony
 
Managing I/O in c++
Pranali Chaudhari
 
C introduction by thooyavan
Thooyavan Venkatachalam
 
C cheat sheet for varsity (extreme edition)
Saifur Rahman
 
Introduction to C++
Sikder Tahsin Al-Amin
 
C++ Overview PPT
Thooyavan Venkatachalam
 

Viewers also liked (20)

PPT
01 c++ Intro.ppt
Tareq Hasan
 
PDF
20130110 prs presentation ncim c++ 11
Harold Kasperink
 
PPTX
6 Week Basic Computer Trainning In Ambala! BATRA COMPUTER CENTRE
jatin batra
 
PPT
Microsoft excel
GC University Faisalabad
 
PPT
Looping in c++
deekshagopaliya
 
PDF
Cpp loop types
Rj Baculo
 
PPT
Looping in c++
deekshagopaliya
 
PPTX
Exel avanzado
chinchulyn
 
PPT
Chapter 7 - The Repetition Structure
mshellman
 
PPT
C++loop statements
Muhammad Uzair Rasheed
 
PPT
While loop
Feras_83
 
PDF
[C++]3 loop statement
Junyoung Jung
 
PPTX
Loop c++
Mood Mood
 
DOCX
12th CBSE Practical File
Ashwin Francis
 
PPTX
C++ loop
Khelan Ameen
 
PPTX
Loops c++
Shivani Singh
 
PPTX
Tutorial 7: Advanced Functions and Conitional Formating
cios135
 
PPT
lecture1 introduction to computer graphics(Computer graphics tutorials)
Daroko blog(www.professionalbloggertricks.com)
 
DOCX
Computer science project work
rahulchamp2345
 
PPTX
Introduction to Computer graphics
PrathimaBaliga
 
01 c++ Intro.ppt
Tareq Hasan
 
20130110 prs presentation ncim c++ 11
Harold Kasperink
 
6 Week Basic Computer Trainning In Ambala! BATRA COMPUTER CENTRE
jatin batra
 
Microsoft excel
GC University Faisalabad
 
Looping in c++
deekshagopaliya
 
Cpp loop types
Rj Baculo
 
Looping in c++
deekshagopaliya
 
Exel avanzado
chinchulyn
 
Chapter 7 - The Repetition Structure
mshellman
 
C++loop statements
Muhammad Uzair Rasheed
 
While loop
Feras_83
 
[C++]3 loop statement
Junyoung Jung
 
Loop c++
Mood Mood
 
12th CBSE Practical File
Ashwin Francis
 
C++ loop
Khelan Ameen
 
Loops c++
Shivani Singh
 
Tutorial 7: Advanced Functions and Conitional Formating
cios135
 
lecture1 introduction to computer graphics(Computer graphics tutorials)
Daroko blog(www.professionalbloggertricks.com)
 
Computer science project work
rahulchamp2345
 
Introduction to Computer graphics
PrathimaBaliga
 
Ad

Similar to 45 Days C++ Programming Language Training in Ambala (20)

PPTX
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
PPTX
Data types
Sachin Satwaskar
 
PPTX
Concept of c data types
Manisha Keim
 
PDF
Introduction to c++
Prof. Dr. K. Adisesha
 
PPTX
PRINCE PRESENTATION(1).pptx
SajalKesharwani2
 
PPTX
C++ overview
Prem Ranjan
 
PPTX
Concept Of C++ Data Types
k v
 
PPT
Introduction to Inheritance in C plus plus
University of Sindh
 
PPT
lecture5-cpp.pptintroduccionaC++basicoye
quetsqrj
 
PDF
Introduction to c++ ppt
Prof. Dr. K. Adisesha
 
PPT
UsingCPP_for_Artist.ppt
vinu28455
 
PPTX
Object oriented programming 8 basics of c++ programming
Vaibhav Khanna
 
PPTX
Introduction to C++ Programming
Preeti Kashyap
 
PPT
lecture02-cpp.ppt
MZGINBarwary
 
PPTX
OOPS (object oriented programming) unit 1
AnamikaDhoundiyal
 
PPTX
OODP Unit 1 OOPs classes and objects
Shanmuganathan C
 
PPTX
Object Oriented Programming Using C++.pptx
bscit6
 
PPT
C++ tutorials
Divyanshu Dubey
 
PPTX
C++ language basic
Waqar Younis
 
PPTX
Presentation on C++ programming
AditiTibile
 
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
Data types
Sachin Satwaskar
 
Concept of c data types
Manisha Keim
 
Introduction to c++
Prof. Dr. K. Adisesha
 
PRINCE PRESENTATION(1).pptx
SajalKesharwani2
 
C++ overview
Prem Ranjan
 
Concept Of C++ Data Types
k v
 
Introduction to Inheritance in C plus plus
University of Sindh
 
lecture5-cpp.pptintroduccionaC++basicoye
quetsqrj
 
Introduction to c++ ppt
Prof. Dr. K. Adisesha
 
UsingCPP_for_Artist.ppt
vinu28455
 
Object oriented programming 8 basics of c++ programming
Vaibhav Khanna
 
Introduction to C++ Programming
Preeti Kashyap
 
lecture02-cpp.ppt
MZGINBarwary
 
OOPS (object oriented programming) unit 1
AnamikaDhoundiyal
 
OODP Unit 1 OOPs classes and objects
Shanmuganathan C
 
Object Oriented Programming Using C++.pptx
bscit6
 
C++ tutorials
Divyanshu Dubey
 
C++ language basic
Waqar Younis
 
Presentation on C++ programming
AditiTibile
 
Ad

More from jatin batra (20)

PDF
Best SMO Training &Coaching in Ambala
jatin batra
 
PDF
Best HTML Training &Coaching in Ambala
jatin batra
 
PDF
Best SEO Training & Coaching in Ambala
jatin batra
 
PDF
Best Photoshop Training in Ambala
jatin batra
 
PDF
Best C Programming Training & Coaching in Ambala
jatin batra
 
PDF
BASIC COMPUTER TRAINING & COACHING CENTRE IN AMBALA CANTT
jatin batra
 
PPTX
Web Browser ! Batra Computer Centre
jatin batra
 
PPTX
Search Engine Training in Ambala ! Batra Computer Centre
jatin batra
 
PPTX
Networking Training in Ambala ! Batra Computer Centre
jatin batra
 
PPTX
SQL Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
PPTX
Networking ! BATRA COMPUTER CENTRE
jatin batra
 
PPTX
Ms Office 2010 Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
PPTX
Basic Computer Training Centre in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
PPTX
Corel Draw Training Institute in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
PPTX
Basic Computer Training Institute ! BATRA COMPUTER CENTRE
jatin batra
 
PPTX
HTML Training Institute in Ambala ! Batra Computer Centre
jatin batra
 
PPTX
Benefits of Web Browser ! Batra Computer Centre
jatin batra
 
PPTX
SEO Training in Ambala ! Batra Computer Centre
jatin batra
 
PPTX
Internet Training Centre in Ambala ! Batra Computer Centre
jatin batra
 
PPTX
Basic Computer Training Centre in Ambala ! Batra Computer Centre
jatin batra
 
Best SMO Training &Coaching in Ambala
jatin batra
 
Best HTML Training &Coaching in Ambala
jatin batra
 
Best SEO Training & Coaching in Ambala
jatin batra
 
Best Photoshop Training in Ambala
jatin batra
 
Best C Programming Training & Coaching in Ambala
jatin batra
 
BASIC COMPUTER TRAINING & COACHING CENTRE IN AMBALA CANTT
jatin batra
 
Web Browser ! Batra Computer Centre
jatin batra
 
Search Engine Training in Ambala ! Batra Computer Centre
jatin batra
 
Networking Training in Ambala ! Batra Computer Centre
jatin batra
 
SQL Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
Networking ! BATRA COMPUTER CENTRE
jatin batra
 
Ms Office 2010 Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
Basic Computer Training Centre in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
Corel Draw Training Institute in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
Basic Computer Training Institute ! BATRA COMPUTER CENTRE
jatin batra
 
HTML Training Institute in Ambala ! Batra Computer Centre
jatin batra
 
Benefits of Web Browser ! Batra Computer Centre
jatin batra
 
SEO Training in Ambala ! Batra Computer Centre
jatin batra
 
Internet Training Centre in Ambala ! Batra Computer Centre
jatin batra
 
Basic Computer Training Centre in Ambala ! Batra Computer Centre
jatin batra
 

Recently uploaded (20)

PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Dimensions of Societal Planning in Commonism
StefanMz
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
community health nursing question paper 2.pdf
Prince kumar
 

45 Days C++ Programming Language Training in Ambala

  • 2. 45 Days C++ Programming Training In Ambala www.batracomputercentre.com Email id: [email protected] Ph. No.: 9729666670, 4000670
  • 3. Introduction To C++ • C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 4. History of C++ • C++ Development started in 1979.During the creation of Ph.D. thesis, Bjarne Stroustrup worked with language called Simula. • Bjarne Stroustrup identified that this OOP features can be included in the software development • C++ is also called as C with classes • Stroustrup states that the purpose of C++ is to make writing good programs easier and more pleasant for the individual programmer. • After that Bjarne Stroustrup started working on the C language and added more extra OOP features to the classic C.He added features in such a fashion that the basic flavor of C remains unaffected. • C++ programming language is extension to C Language. In C we have already used increment operator (++). Therefore we called C++ as “Incremented C” means Extension to C. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 5. Characteristics Of C++ • C++ Provides huge Function Library that’s why its popularity is increasing day by day and more programmers are inclining towards C++ due to its multiple features – • C++ is an Object Oriented Programming Language (OOPL). • C++ have huge Function Library • C++ is highly Flexible language with Versatility. • C++ can be used for developing System Software viz., operating systems, compilers, editors and data bases. • C++ is suitable for Development of Reusable Software. , thus reduces cost of software development. • C++ is a Machine Independent Language. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 6. Features Of C++ 1. Objects 2. Classes 3. Abstraction 4. Encapsulation 5. Inheritance 6. Overloading 7. Exception Handling Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 7. Objects • Objects are the basic unit of OOP. They are instances of class, which have data members and uses various member functions to perform tasks. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 8. Classes • Class can also be defined as user defined data type but it also contains functions in it. So, class is basically a blueprint for object. It declare & defines what data variables the object will have and what operations can be performed on the class's object. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 9. Abstraction • Abstraction refers to showing only the essential features of the application and hiding the details. In C++, classes provide methods to the outside world to access & use the data variables, but the variables are hidden from direct access. This can be done access specifiers. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 10. Encapsulation • It can also be said data binding. Encapsulation is all about binding the data variables and functions together in class. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 11. Inheritance • Inheritance is a way to reuse once written code again and again. The class which is inherited is called base calls & the class which inherits is called derived class. So when, a derived class inherits a base class, the derived class can use all the functions which are defined in base class, hence making code reusable. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 12. Overloading • It is a feature, which lets us create functions with same name but different arguments, which will perform differently. That is function with same name, functioning in different way. Or, it also allows us to redefine a function to provide its new definition. You will learn how to do this in details soon in coming lessons. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 13. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 14. Variables In C++ • A variable provides us with named storage that our programs can manipulate. • Each variable in C++ has a specific type, which determines the size and layout of the variable's memory. • the range of values that can be stored within that memory; • the set of operations that can be applied to the variable. • The name of a variable can be composed of letters, digits, and the underscore character. • It must begin with either a letter or an underscore. • Upper and lowercase letters are distinct because C++ is case-sensitive. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 15. Constants In C++ • Constants refer to fixed values that the program may not alter and they are called literals. • Constants can be of any of the basic data types and can be divided into Integer Numerals, Floating-Point Numerals, Characters, Strings and Boolean Values. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 16. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 17. 1) User Defined Data Types • These are the type, that user creates as a class. In C++ these are classes where as in C it was implemented by structures. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 18. a) Structures • Structure is the collection of variables of different types under a single name for better visualization of problem and can hold data of one or more types. • The struct keyword defines a structure type followed by an identifier(name of the structure). Then inside the curly braces, you can declare one or more members (declare variables inside curly braces) of that structure. For example: struct person { char name[50]; int age; float salary; }; Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 19. b) Unions • Unions allow one portion of memory to be accessed as different data types. Its declaration and use is similar to the one of structures, but its functionality is totally different. For Example: union type_name { member_type1 member_name1; member_type2 member_name2; member_type3 member_name3; . . } object_names; Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 20. c) Enumeration Enumerated types are types that are defined with a set of custom identifiers, known as enumerators, as possible values. Objects of these enumerated types can take any of these enumerators as value. Their syntax is: This creates the type type_name, which can take any of value1, value2, value3, ... as value. Objects (variables) of this type can directly be instantiated as object_names. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 21. d) Class • C++ offers a new user-defined data type known as class, which forms the basis of object-oriented programming. A class acts as a template which defines the data and functions that are included in an object of a class. Classes are declared using the keyword class. Once a class has been declared, its object can be easily created. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 22. 2) Built In Data Type • The basic (fundamental) data types provided by C++ are integral, floating point and void data type. Among these data types, the integral and floating-point data types can be preceded by several type modifiers. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 23. a) Int • Numbers without the fractional part represent integer data. In C++, the int data type is used to store integers such as 4, 42, 5233, -32, -745. Thus, it cannot store numbers such as 4.28, -62.533. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 24. b) Char • Characters refer to the alphabet, numbers and other characters (such as {, @, #, etc.) defined in the ASCII character set. In C++, the char data type is also treated as an integer data type as the characters are internally stored as integers that range in value from - 128 to 127 Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 25. c) Float • A floating-point data type is used to store real numbers such as 3 .28, 64. 755765, 8.01, -24.53. This data type includes float and double' data types. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 26. 3) Derived Data Types • Data types that are derived from the built-in data types are known as derived data types. The various derived data types provided by C++ are arrays, functions, pointers and references. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 27. a) Array • An array is a set of elements of the same data type that are referred to by the same name. All the elements in an array are stored at contiguous memory locations and each element is accessed by a unique index or subscript value. The subscript value indicates the position of an element in an array. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 28. b) Functions • A function is a self-contained program segment that carries out a specific well- defined task. In C++, every program contains one or more functions which can be invoked from other parts of a program, if required. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 29. c) Pointers • A pointer is a variable that can store the memory address of another variable. Pointers allow to use the memory dynamically. That is, with the help of pointers, memory can be allocated or de- allocated to the variables at run-time, thus, making a program more efficient. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 30. d) References • A reference is an alternative name for a variable. That is, a reference is an alias for a variable in a program. A variable and its reference can be used interchangeably in a program as both refer to the same memory location Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 31. Loops in C++ 1. Loop control statements change execution from its normal sequence. When execution leaves a scope, all automatic objects that were created in that scope are destroyed. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 32. Loop Type Description For Loop Execute a sequence of statements multiple times and abbreviates the code that manages the loop variable. While Loop Repeats a statement or group of statements while a given condition is true. It tests the condition before executing the loop body. Do while loop Like a while statement, except that it tests the condition at the end of the loop body Nested Loops You can use one or more loop inside any another while, for or do..while loop. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 33. Decision Making Statements • Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 34. Statements Description If Statement An if statement consists of a boolean expression followed by one or more statements. If… Else Statement An if statement can be followed by an optional else statement, which executes when the boolean expression is false. Switch Statements A switch statement allows a variable to be tested for equality against a list of values. Nested if statements You can use one if or else if statement inside another if or else if statement(s). Nested Switch Statements You can use one switch statement inside another switch statement(s). Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 35. Basic Input/output • The C++ standard libraries provide an extensive set of input/output capabilities which we will see in subsequent chapters. This chapter will discuss very basic and most common I/O operations required for C++ programming. • C++ I/O occurs in streams, which are sequences of bytes. If bytes flow from a device like a keyboard, a disk drive, or a network connection etc. to main memory, this is called input operation and if bytes flow from main memory to a device like a display screen, a printer, a disk drive, or a network connection, etc, this is called output operation. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 36. Output Stream The predefined object cout is an instance of ostream class. The cout object is said to be "connected to" the standard output device, which usually is the display screen. The cout is used in conjunction with the stream insertion operator, which is written as << which are two less than signs as shown in the following example. cout << "Value of str is : " << str << endl; Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 37. Input Stream The predefined object cin is an instance of istream class. The cin object is said to be attached to the standard input device, which usually is the keyboard. The cin is used in conjunction with the stream extraction operator, which is written as >> which are two greater than signs as shown in the following example. cin >> name; Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 38. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 39. C++ Programming Language Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.comwww.batracomputercentre.com
  • 40. C++ Programming Language • Introduction • Classes, Objects • Inheritance • Polymorphism • Overloading • Encapsulation • Constructor & Destructor • Function • Pointers Structure • Arrays & Strings • Structures, Union Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com
  • 41. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com SCO-15 Dayal Bagh, Near Panchmukhi Hanuman Mandir, Ambala Cantt- 133001 Haryana Ph. NO. : 4000670, 97296666770 www.batracomputercentre.com [email protected]
  • 43. Email id: [email protected] Ph. No.: 9729666670, 4000670 www.batracomputercentre.com