• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 101 pages
Exam (elaborations)

Data structures using C++

Document preview thumbnail
Preview 4 out of 101 pages

1. Basic Concept, 2. Important Multiple choice QA, 3.Important 3 marks QA, 4. Important 12 marks QA, 5. Model Question paper.

Content preview

1



Arulmigu Meenakshi Amman college of Engineering
Vadamavandal-604410.
Prepared by,
V.Umapathy,
Prof./Mech.
Imortant Questions and Answers
CS25C05 - Data Structures using C++
Syllabus
1. Data Abstraction & Overloading: Overview of C++, Structures, Class Scope and
Accessing Class Members, Reference Variables, Initialization, Constructors, Destructors,
Member Functions and Classes, Friend Function, Dynamic Memory Allocation, Static Class
Members, Container Classes and Integrators, Proxy Classes, Overloading: Function
overloading and Operator Overloading.
Practical:
1. Program to Implement Constructors and Destructors.
2. Program to implement Member Functions, Classes and Friend Functions.
3. Program to Implement Dynamic Memory Allocation and Overloading.

2. Inheritance & Polymorphism: Base Classes and Derived Classes, Protected Members,
Casting Class pointers and Member Functions, Overriding, Public, Protected and Private
Inheritance–Constructors and Destructors in derived Classes, Implicit Derived, Class Object
to Base, Class Object Conversion, Composition Vs. Inheritance, Virtual functions, This
Pointer, Abstract Base Classes and Concrete Classes, Virtual Destructors, Dynamic Binding.
Practical:
1. Program to Implement various inheritances.
2. Program to Implement virtual functions and dynamic binding.
3. Implementation of method overriding and operator overloading.

3. Linear Data Structures: Asymptotic Notations: Big-Oh, Omega and Theta, Best, Worst and
Average case Analysis: Definition and an example, Arrays and its representations, Stacks
and Queues, Linked lists, Linked list based implementation of Stacks and Queues,
Evaluation of Expressions, Linked list based polynomial addition.
Practical:

, 2


1. Program to implement various operations on arrays and linked lists.
2. Program to implement various operations on stacks and queues using array and linked
list.
3. Program to evaluate the infix expressions by converting into prefix and postfix
expressions

4. Non-Linear Data Structures: Trees, Binary Trees, Binary tree representation and
traversals, Threaded binary trees, Binary tree representation of trees, Application of trees:
Set representation and Union, Find operations, Graph and its representations, Graph
Traversals, Connected components. Standard template library.
Practical:
1. Program to Implement Binary Tree Traversal and Graph Traversal Algorithm.
2. Program to Implement the Single Source Shortest Path Algorithm and All Pair Shortest
Path Algorithm.
3. Program to find the Minimal Spanning Tree for a Graph.

5. Searching, Sorting and Complexity Analysis: Insertion sort, Merge sort, Quicksort,
Heapsort, Linear Search, Binary Search.
Practical:
1. Program to Implement Linear Search and Binary Search Algorithms.
2. Program to Implement Insertion Sort, Merge Sort, Quick Sort and Heap Sort Algorithms.

S.No Description
.
Unit-I
Data Abstraction & Overloading
Introduction
Data Abstraction
- Hiding implementation details, showing only essential info
- Achieved using classes, access specifiers (public, private, protected)

Overview of C++
- Object-Oriented Programming (OOP) language
- Combines data and functions

Structures
- Similar to classes, but default access is public

struct Student {

, 3


int rollNo;
char name[20];
};


Class Scope and Accessing Members
- Class scope: Where class members are defined
- Access members using: dot (.) or arrow (->) operators

class Student {
public:
void display() {}
};

Student s;
s.display();


Reference Variables
- Alias for existing variable

int x = 10;
int& ref = x; // ref is alias for x


Initialization
- Assigning initial value to variables

int x = 10; // initialization


*_Constructors & Destructors_- Constructors: Initialize objects
- Destructors: Release resources

class Student {
public:
Student() {} // constructor
~Student() {} // destructor
};

, 4




Member Functions & Classes
- Functions inside classes
- Can access class members

class Student {
public:
void display() {}
};


Friend Function
- Non-member function with access to private members

class Student {
friend void display(Student s);
};


Dynamic Memory Allocation
- Allocate memory at runtime
- new, delete operators

int* ptr = new int;
// ...
delete ptr;


Static Class Members
- Shared by all objects

class Student {
public:
static int count;
};
int Student::count = 0;


Overloading
1. Function Overloading

Document information

Uploaded on
October 30, 2026
Number of pages
101
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
231
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions