BSCS students can now download the complete IT Series textbook, Object-Oriented Programming using C++, in PDF format. Written by Tasleem Mustafa, Imran Saeed, Tariq Mahmood, and Ahsan Raza Sattar, this 2nd edition is designed around the OOP course taught in BSCS programs at Pakistani universities, following the syllabus used by HEC-recognized institutions. The book starts with programming fundamentals and moves step by step through C++ syntax, control structures, arrays, structures, pointers, and functions, before building into full object-oriented concepts such as classes, inheritance, polymorphism, and file handling. It ends with an introduction to data structures, giving students one complete resource for the entire OOP course instead of switching between multiple references.
For students preparing for mid-term and final exams, this book works well because each chapter pairs theory with more than 300 solved programs, along with hundreds of exercise questions, MCQs, fill in the blanks, and true/false items. Reading the chapter explanations alongside the important questions listed on this page makes revision faster before university exams and helps in strengthening both conceptual understanding and practical coding skills, which are tested separately in most OOP courses.
Book Overview
| Class | BSCS |
| Subject | Object Oriented Programming using C++ |
| Series | IT Series |
| Edition | 2nd Edition |
| Authors | Tasleem Mustafa, Imran Saeed, Tariq Mahmood, Ahsan Raza Sattar |
| Total Chapters | 19 |
| Format | PDF (Free Download) |
Chapter List
Chapter 1: Introduction to Programming
This chapter introduces problem solving as the first step in programming, followed by how a program converts data into information. It explains algorithms and pseudocode along with their properties, and shows how flowcharts use standard symbols to represent the same logic visually. Students learn the full program development process, the difference between low-level and high-level languages, and how procedural, non-procedural, and object-oriented languages compare. The chapter also covers source code versus object code, the role of compilers, interpreters, and assemblers as language processors, and closes with an overview of structured, event-driven, and visual programming techniques.
Important Questions:
- Define problem solving. Identifying a problem and finding the best solution through a well-organized approach.
- Define programming. The process of solving a problem with the help of a computer system.
- Who is a programmer? A person who writes instructions in a programming language to convert data into information.
- What is top-down design? Breaking a problem into smaller parts, also called divide and conquer.
Chapter 2: Introduction to C++
Chapter 2 traces the history of C++ and highlights the features that make it different from C. It breaks down the basic structure of a C++ program, including preprocessor directives, header files, the main() function, statements, tokens, and white spaces. Students are guided through installing Turbo C++, using its IDE and directories, and the full cycle of creating, editing, saving, compiling, linking, and executing a program. The chapter ends with debugging in Turbo C++, covering the common types of errors and the built-in features used to find and fix them.
Important Questions:
- What is a preprocessor directive? An instruction processed before compilation, such as #include.
- What is the purpose of #include <iostream.h>? It adds the header file needed for input/output operations.
- What is the process of linking? Combining object code with library code to produce an executable file.
- What is a linker? The program that performs this linking step.
Chapter 3: Programming in C++
This chapter builds the core vocabulary of C++ programming, starting with identifiers, keywords, and the three basic data types: integer, real, and character. It explains integer overflow and underflow, scientific notation, and the rules for declaring and initializing variables and constants, both literal and symbolic. A major part of the chapter covers operators arithmetic, assignment, compound assignment, and increment/decrement along with their precedence and associativity. It closes with implicit and explicit type casting, the sizeof operator, and how to write comments in a program.
Important Questions:
- What is an identifier? A name given to variables, functions, etc., following specific naming rules.
- What is a keyword? A reserved word that has a special, fixed meaning in C++.
- What is a variable? A named memory location that stores a value which can change during program execution.
- Difference between literal and symbolic constants? A literal constant is a fixed value written directly; a symbolic constant is a named, unchanging value.
Chapter 4: Input and Output
Chapter 4 focuses on how C++ programs communicate with the user through input and output. It explains standard output using cout, escape sequences for formatting text, and standard input using cin. Students learn C++ manipulators such as endl, setw, setprecision, fixed, showpoint, and setfill, which control how numbers and text are displayed on screen. Practical examples show how to combine these manipulators to produce neatly formatted output, a skill tested frequently in university exams.
Important Questions:
- What is a stream? A flow of data; C++ has input streams and output streams.
- What is standard output and input? cout displays standard output; cin reads standard input.
- Which header enables cin and cout? iostream.h
- What is the use of insertion and extraction operators? << displays output with cout; >> reads input with cin.
Chapter 5: Conditional Structures
This chapter covers decision-making in C++ through conditional structures. It starts with control structures and relational operators, then explains the if statement and its limitations, followed by if-else, multiple if-else-if, and nested if constructs. Compound conditions built with logical operators are covered in detail, along with how the switch structure compares to nested if-else for handling multiple fixed values. The chapter also introduces the conditional operator and the goto statement, both useful shortcuts in specific programming situations.
Important Questions:
- What is a control structure? A statement that controls the order in which program instructions execute.
- Name the basic branching mechanisms. if, if-else, and switch.
- What is a compound condition? Multiple conditions combined using logical operators.
- Difference between nested if-else and switch? Switch compares one variable against multiple fixed values; nested if can test different, unrelated conditions.
Chapter 6: Looping Structures
Chapter 6 explains how loops let a program repeat a set of instructions automatically. It covers counter-controlled and sentinel-controlled loops, then explores the while loop and do-while loop, highlighting the pretest and posttest difference between them. The for loop is covered in depth along with the continue and break statements that control loop flow. Nested loops are explained with practical examples, showing how one loop can run inside another to solve more complex repetitive problems.
Important Questions:
- What is a loop? A structure that repeats a block of statements until a condition is met.
- Difference between while and do-while loop? do-while always runs at least once; while checks its condition first.
- Difference between pretest and posttest? Pretest checks the condition before running the loop body; posttest checks it after.
- Use of break and continue? break exits the loop entirely; continue skips to the next iteration.
Chapter 7: Arrays
This chapter introduces arrays as a way to store multiple values of the same type under one name. It covers the advantages of arrays, declaring and initializing one-dimensional arrays, and accessing individual elements. Students learn two key searching techniques, sequential search and binary search, along with two common sorting methods, selection sort and bubble sort. The chapter closes with two-dimensional and multidimensional arrays, which are used to store data in rows, columns, and beyond.
Important Questions:
- Define an array. A collection of same-type elements stored in contiguous memory.
- Difference between 1-D and 2-D array? A 1-D array stores a single list; a 2-D array stores data in rows and columns.
- Difference between sequential and binary search? Sequential search checks elements one by one; binary search repeatedly halves a sorted list.
- Difference between selection sort and bubble sort? Selection sort picks the smallest remaining value each pass; bubble sort repeatedly swaps adjacent out-of-order pairs.
Chapter 8: Structures
Chapter 8 introduces structures as a way to group different data types under a single name. It explains how to declare, define, access, initialize, and assign structure variables, including using an array as a structure member. The chapter covers array of structures and nested structures, where one structure contains another. It also compares structures with unions, and introduces enumerations as a way to assign meaningful names to sets of integer values.
Important Questions:
- Define a structure. A user-defined type that groups different data types together under one name.
- Main difference between array and structure? An array holds same-type elements; a structure can hold members of different types.
- What is a nested structure? A structure that contains another structure as one of its members.
- Difference between structure and union? Union members share the same memory location; structure members each get their own.
Chapter 9: Functions
This chapter explains why functions are important for organizing and reusing code, covering the different types of functions available in C++. Students learn to declare, define, and call user-defined functions, and to pass parameters by value or by reference. The chapter distinguishes local, global, static, and register variables, and shows how functions work with arrays and structures. It also introduces default parameters, inline functions, command line parameters, function overloading, and recursion, giving a complete picture of how functions work in real programs.
Important Questions:
- What is a function? A named, reusable block of code that performs a specific task.
- User-defined vs built-in functions? User-defined functions are written by the programmer; built-in functions are provided by the language library.
- What is a function prototype? A declaration telling the compiler a function’s name, return type, and parameters before it is used.
- Difference between local and global variable? A local variable exists only inside its function; a global variable is accessible throughout the program.
Chapter 10: Built-in Functions
Chapter 10 introduces the ready-made functions that come built into C++ libraries, saving programmers from writing common tasks from scratch. It covers functions from conio.h for console input/output, stdio.h for standard I/O operations, and math.h for mathematical calculations such as power, square root, and rounding. The chapter also explains ctype.h functions, which test and convert character and type data. These built-in functions are used throughout the rest of the book and appear often in short-answer exam questions.
Important Questions:
- Which function is used to clear the screen in Turbo C++? clrscr()
- Which function calculates one number raised to the power of another? pow()
- Which function checks if a character is a numeric digit? isdigit()
- Which function converts a lowercase character to uppercase? toupper()
Chapter 11: Pointers
This chapter explains pointers, a core and often challenging C++ concept, starting with memory addresses and references. It covers declaring pointers, the void pointer, the dereference operator, and pointer initialization, followed by arithmetic operations such as addition and subtraction on pointers. Students see how pointers work with arrays, strings, and arrays of pointers, then how they interact with functions and structures. The chapter ends with dynamic memory management using the new and delete operators, an essential skill for later chapters on data structures.
Important Questions:
- What is a pointer? A variable that stores the memory address of another variable.
- What is the dereference operator? The * operator, used to access the value stored at a pointer’s address.
- What is a void pointer? A pointer with no specific data type attached.
- How do pointers relate to arrays? An array’s name itself behaves like a pointer to its first element.
Chapter 12: String Handling
Chapter 12 covers string handling in C++, beginning with how strings are declared and initialized as character arrays. It explains three ways to take string input, cin, cin.getline(), and cin.get(), and how an array of strings can hold multiple words or sentences. The bulk of the chapter introduces the string.h library, covering around 30 built-in string functions such as strlen, strcpy, strcat, strcmp, strrev, strlwr, and strupr. These functions are frequently tested and widely used in practical programming exercises.
Important Questions:
- What character marks the end of a string in C++? The null character , added automatically at the end.
- Why can’t the cin object read a full name that has a space in it? cin stops reading at the first blank space; only the part before the space is stored.
- Which function should be used to read a string that includes spaces? cin.getline()
- How is a string stored in memory in C++? As an array of characters ending with the null character .
Chapter 13: Basics of Object-Oriented Programming
Chapter 13 begins the object-oriented programming portion of the book with core concepts: objects, classes, and the features that define OOP. It explains declaring a class, access specifiers, creating objects, and both executing and defining member functions inside and outside a class. Constructors are covered in depth, including passing parameters, constructor overloading, and the default copy constructor, followed by destructors and how objects can be passed to and returned from functions. The chapter closes with static data members, friend functions, friend classes, and static functions, rounding out the essential building blocks of OOP in C++.
Important Questions:
- Define class and object, and how they relate. A class is the blueprint or definition; an object is a specific instance created from that class.
- What is abstraction? Focusing on what an object does while hiding how it works internally.
- What do you know about encapsulation? Bundling data and functions together in a class, hiding some details from outside access.
- What is the role of constructors? They initialize an object’s instance variables when the object is created.
Chapter 14: Operator Overloading
This chapter explains operator overloading, the technique of giving existing C++ operators new meaning when used with user-defined objects. It covers overloading unary operators such as the increment operator, including the difference between prefix and postfix versions and how to return a value from an overloaded operator function. The chapter then moves to overloading binary operators, including arithmetic operators, comparison operators, and arithmetic assignment operators. Clear examples show why operators that work automatically with basic types need to be explicitly overloaded to work with class objects.
Important Questions:
- What is operator overloading? Giving an existing operator, like +, additional meaning when used with a user-defined type.
- Name at least three unary operators that can be overloaded. Examples include ++, –, and unary -.
- When overloading the binary + operator, why is a friend function sometimes used? A friend function can access the private data of both operand objects directly, which helps when the left operand is not an object of the class.
- In the expression “X + Y”, which operand invokes the overloaded operator function? The left operand, X.
Chapter 15: Inheritance
Chapter 15 explains inheritance, the technique of building a new class from an existing one to reuse its code. It covers the advantages of inheritance, the two main categories, single and multiple, and the protected access specifier, followed by how to specify a derived class and access the constructors and member functions of its parent. The chapter explains function overriding and the three types of inheritance, public, protected, and private, then moves into multilevel and multiple inheritance, including how constructors behave and how ambiguity is resolved when a class inherits from more than one parent. It ends with containership, where one class holds an object of another as a member.
Important Questions:
- What is inheritance? Reusing an existing class, the base class, to build a new class, the derived class.
- What are the categories of inheritance? Single inheritance and multiple inheritance, which combine to form multilevel and hierarchical patterns.
- Which constructor runs first: base or derived class? The base class constructor runs first.
- Public vs private vs protected inheritance? Each controls how the base class member access level carries over into the derived class.
Chapter 16: Polymorphism and Virtual Function
This chapter introduces polymorphism, the ability of objects of different types to respond to the same function call in their own way. It explains pointers to objects and arrays of object pointers, then shows how pointers work together with inheritance. Virtual functions are covered in detail, including the difference between early binding at compile time and late binding at runtime. The chapter closes with pure virtual functions, abstract classes, and virtual base classes, which solve ambiguity problems in more complex inheritance structures.
Important Questions:
- Define polymorphism. Objects of different types responding to the same function call in their own way.
- What is a virtual function? A function that enables late (runtime) binding to support polymorphism.
- Difference between overloading and overriding? Overloading uses the same name with a different signature in the same class; overriding redefines a base class function in a derived class.
- Early binding vs late binding? Early binding resolves a function call at compile time; late binding resolves it at runtime.
Chapter 17: Template
Chapter 17 introduces templates, a technique for writing generic code that works with different data types without rewriting the same function or class repeatedly. It explains function templates, including how to declare and use them, and shows how they reduce the need for function overloading. The chapter also covers class templates and how they are used to create generic, reusable class definitions. Templates are a compact but important topic, often tested in short-answer university exam questions.
Important Questions:
- When is a function template required? When the implementation details of a function are independent of the parameters’ data types.
- What does writing a class as a template let you do? Write one class definition that works with different data types, instead of repeating the class for each type.
- True or False: All classes should be converted into templates. False, only classes that genuinely need to work generically across data types benefit from templates.
- True or False: In a template function, every parameter must be of the template type T. False.
Chapter 18: File Handling
Chapter 18 covers file handling, showing how C++ programs can store data permanently instead of losing it when the program ends. It explains the advantages and types of files, along with sequential and random file access methods, streams, and the predefined stream objects used to open, verify, and close files. The chapter goes into formatted file input/output, detecting end-of-file, and reading lines from a file, followed by character I/O for reading and writing single characters. It closes with binary I/O, used for storing data in its raw, non-text form.
Important Questions:
- Why can’t cout write to a file? cout only writes to standard output; an ofstream object is needed to write to files.
- What is required before writing to a text file? Include fstream, declare an ofstream variable, and open the file.
- Advantages of files over standard input/output? Permanent storage, data sharing between programs, and multiple input sources.
- How is a file closed? Using the stream object’s close() method.
Chapter 19: Data Structures
The final chapter introduces data structures, covering their types and the basic operations performed on them. It explains linked lists in their singly, doubly, and circularly linked forms, followed by stacks and queues represented using both arrays and linked lists. The chapter then covers trees in detail, including tree terminology, binary trees, tree traversal, insertion and deletion, and binary search trees. It closes with an introduction to graphs, covering directed and undirected types, giving students a solid foundation for further data structures study.
Important Questions:
- What is a linked list? A dynamic structure built from nodes and pointers; can be singly, doubly, or circularly linked.
- What does LIFO mean? Last In, First Out, the basis of a stack.
- Advantage of a binary tree over an array or linked list? Faster inserts, searches, and deletes, without needing a fixed size upfront.
- Single vs double linked list? A single linked list only moves forward; a double linked list allows moving in both directions.
Download Object Oriented Programming C++ PDF
Your free PDF is ready. Click the button below to download the complete IT Series OOP C++ textbook.
⬇ Download PDFWho Should Read This
This book is written for BSCS students taking Object Oriented Programming at Pakistani universities. BIT, BSIT, and MCS students with OOP in their curriculum will also find it very useful. With 300+ programs, complete Data Structures coverage, and hundreds of MCQs and exercise questions, it covers everything needed for both theory and practical exams.
Applicable Universities
This IT Series OOP textbook is widely used at Pakistani universities offering BSCS, BIT, BSIT, and MCS programs including Punjab University, Virtual University, COMSATS, FAST, UET, and other HEC-recognized institutions.
FAQs
Is this the IT Series OOP C++ book for BSCS students?
Yes, this is the IT Series Object-Oriented Programming using C++ 2nd edition by Tasleem Mustafa and co-authors, widely used in BSCS programs at Pakistani universities.
How many programs are in this book?
More than 300 complete C++ programs are included, covering all topics from basic programming to OOP concepts, Data Structures, and File Handling.
Does this book include Data Structures?
Yes, Chapter 19 covers Data Structures including linked lists (singly, doubly, and circularly linked) and stack implementation.
Is inheritance and polymorphism covered in detail?
Yes, Chapters 15 and 16 cover all types of inheritance, function overriding, virtual functions, abstract classes, and polymorphism with examples.
Can BIT or BSIT students also use this book?
Yes, BIT, BSIT, and MCS students with OOP in their syllabus will find this book very useful for both theory and practical exam preparation.
Is this the latest edition?
This is the 2nd edition of the IT Series OOP using C++ book, which is the latest available version for Pakistani university students.
Related Books
- Database Management System PDF Download – BSCS University
- Key Book to OOP C++ Programming Exercises PDF Download – IT Series BSCS
- The Concepts of Information Technology PDF Download – IT Series (2nd Edition)
- Operating Systems and Networks PDF Download – IT Series BSCS (5th Edition)
- Data Structures in C++ PDF Download – Aikman Series BSCS
- Number System & Boolean Algebra SN-2 Notes