Reface: About The Subject
Reface: About The Subject
C++ also facilitates type checking and modularity through classes. Class is the key concept of C++. It is user-defined
data type and provides features such as data hiding, implicit type conversion, dynamic typing, user controlled memory
management etc. C++ library mostly depends upon STL. Other useful tool it provides are containers, iterators,
multisets, templates etc. It is implemented through compilers rather than interpreters. C++ and its standard libraries
are designed for portability.
According to the examination pattern of B.Sc students, this book provides the following features:
v Important Questions are included to help students prepare for Internal and External Assessment.
v List of Programs are provided before the units for easy reference.
v Every unit is structured into two main sections viz. Short Questions and Essay Questions with solutions
along with Learning Objectives and Introduction.
v Two Model Papers are provided in order to help students understand the paper pattern in the end examination.
v Exercise Questions are provided for every unit which the students need to solve.
The table below gives complete idea about the subject, which will be helpful to plan and score good marks in their
exams.
Unit
Unit Name Description
No.
This unit covers the basic concepts of C++ and Object Oriented Program-
ming. It includes topics like Applications, Example Programs, Tokens,
Tokens, Data Types, Operators, Expressions, Control Structures, Arrays,
Strings, Pointers, Searching and Sorting Arrays. Introduction of Func-
Introduction to C++ and
1. tions, Prototype, Passing Data by Value, Reference Variables, Using Ref-
Object Oriented Programming
erence Variables as Parameters, Inline Functions, Default Arguments,
Overloading Functions, Passing Arrays to Functions. Procedural and
Object-Oriented Programming, Terminology, Benefits of OOP, OOP
Languages and Applications.
This unit covers the basic concept of Classes. It includes topics
like Defining an Instance of a Class, Why Have Private Members?,
Separating Class Specification from Implementation, Inline Member
Functions, Constructors, Passing Arguments to Constructors, Destruc-
2. Classes
tors, Overloading Constructors, Private Member Functions, Arrays of
Objects, Instance and Static Members, Friends of Classes, Member-
wise Assignment, Copy Constructors, Operator Overloading, Object
Conversion, Aggregation.
This unit covers the basic concepts of Inheritance and C++ Streams.
It includes topics like Protected Members and Class Access, Base
Class Access Specification, Constructors and Destructors in Base and
3. Inheritance and C++ Streams Derived Classes, Redefining Base Class Functions, Class Hierarchies,
Polymorphism and Virtual Member Functions, Abstract Base Classes
and Pure Virtual Functions, Multiple Inheritance. Stream Classes,
Unformatted I/O Operations, Formatted I/O Operations.
This unit covers the basic concepts of Exceptions and Templates. It
includes topics like Throwing an Exception, Handling an Exception,
Object-Oriented Exception Handling with Classes, Multiple Excep-
tions, Extracting Data from the Exception Class, Re-throwing and
4. Exceptions and Templates
Exception, Handling the bad_alloc Exception. Function Templates
Function Templates with Multiple Type, Overloading with Function
Templates, Class Templates Defining Objects of the Class Template,
Class Templates and Inheritance, Introduction to the STL.
It is sincerely hoped that this book will satisfy the expectations of students and at the same time helps them to score
maximum marks in exams.
Suggestions for improvement of the book from our esteemed readers will be highly appreciated and incorporated
in our forthcoming editions.