BSCS students can download the complete Aikman Series textbook “Data Structures in C++” as a free PDF. Written by C M Aslam (M.Sc. Computer Science, M.Sc. Punjab University) and published by Aikman Book Corporation, Lahore, this book covers all the fundamental data structures taught in Pakistani universities using the C++ programming language.
The book is written in simple, easy-to-follow language with small, practical C++ programs alongside every algorithm. It is suitable for self-study, classroom use, and exam preparation for BSCS students, and all programs are compatible with Turbo C++ and Borland C++.
Book Overview
| Level | University / BSCS |
| Subject | Data Structures in C++ |
| Series | Aikman Series |
| Author | C M Aslam (M.Sc. Comp. Sc., M.Sc. PU) |
| Publisher | Aikman Book Corporation, Urdu Bazar, Lahore |
| Total Chapters | 9 |
| Total Pages | 241 |
| Format |
Chapter List
Chapter 1: Introduction
Explains the difference between data and information, key terms like entity, field, record, and file, and defines a data structure as a user-defined type built from basic data types. Covers linear (arrays, linked lists, stacks, queues) versus non-linear (trees, graphs) data structures, core operations (inserting, deleting, searching, traversing, sorting), and how algorithms are written using comments, selection statements, loops, and sub-algorithms.
Important Questions:
- What is the difference between data and information? Answer: Data is raw facts and values, while information is processed data that carries useful meaning.
- Give two examples each of linear and non-linear data structures. Answer: Arrays and linked lists are linear; trees and graphs are non-linear.
- What are the basic operations performed on data structures? Answer: Inserting, deleting, searching, traversing, sorting, and merging.
- What is an algorithm? Answer: A step-by-step procedure for solving a problem, written before the actual program code.
Chapter 2: Arrays
Defines an array as an ordered collection of same-type elements accessed by index, and explains lower bound, upper bound, and size (UB − LB + 1). Covers how arrays occupy a contiguous memory block with a base address, and the main array operations: traversing, inserting (at the end or at a specified location), deleting, plus two-dimensional arrays and matrix operations.
Important Questions:
- How is the size of a one-dimensional array calculated? Answer: Size = Upper Bound (UB) minus Lower Bound (LB), plus 1.
- What is the base address of an array? Answer: The memory address of the array’s first element, used to calculate the address of any other element.
- What is the index of the first element of an array in C++? Answer: 0.
- Name the two ways items can be inserted into an array. Answer: Inserting at the end of the array and inserting at a specified location.
Chapter 3: Strings
Defines a string as a sequence of characters ending with a null character (‘