C++ Developer – 100+ Lab Exercises (Basic, Intermediate, Advanced)

🔰 Basic Level (30+ Exercises)

 

Goal: Learn the foundations of C++ programming, control structures, and arrays.

 

C++ Fundamentals

  • Lab 01: Setup C++ environment (Code::Blocks, VS Code, or GCC).

  • Lab 02: Hello World program.

  • Lab 03: Variables and Data Types – simple calculator.

  • Lab 04: Input/Output using cin and cout.

  • Lab 05: Constant and macro definitions.

Control Structures

  • Lab 06: If-else based grade calculator.

  • Lab 07: Leap year checker.

  • Lab 08: Switch-case menu-driven calculator.

  • Lab 09: Print Fibonacci series using while.

  • Lab 10: Multiplication table using for.

Loops and Patterns

  • Lab 11: Print numeric triangle using nested loops.

  • Lab 12: Print pyramid and reverse pyramid.

  • Lab 13: Prime number checker.

  • Lab 14: Factorial of a number.

Functions & Arrays

  • Lab 15: Functions with and without return types.

  • Lab 16: Recursive factorial calculator.

  • Lab 17: Pass by value vs reference.

  • Lab 18: Linear search in array.

  • Lab 19: Bubble sort implementation.

  • Lab 20: Reverse array using pointers.


 

🚀 Intermediate Level (40+ Exercises)

 

Goal: Strengthen knowledge in memory handling, object-oriented programming, STL, and file management.

 

Pointers & Memory

  • Lab 21: Pointer basics – swap using pointers.

  • Lab 22: Pointer arithmetic demonstration.

  • Lab 23: Dynamic memory allocation with new/delete.

  • Lab 24: Arrays and pointers.

  • Lab 25: Dangling pointer detection.

Object-Oriented Programming

  • Lab 26: Create a class Student with member functions.

  • Lab 27: Constructor overloading.

  • Lab 28: Class inheritance – Person and Employee.

  • Lab 29: Polymorphism with virtual functions.

  • Lab 30: Abstract class example.

Operator Overloading

  • Lab 31: Overload + and - operators for custom Complex class.

  • Lab 32: Overload increment ++ operator.

  • Lab 33: Overload assignment operator.

File Handling

  • Lab 34: Create and write to a text file.

  • Lab 35: Read from a file and display content.

  • Lab 36: Append data to an existing file.

  • Lab 37: Copy content from one file to another.

  • Lab 38: File handling with classes.

Standard Template Library (STL)

  • Lab 39: Use of vector with sorting.

  • Lab 40: map operations – dictionary creation.

  • Lab 41: stack implementation using STL.

  • Lab 42: queue operations and simulation.

  • Lab 43: set operations – removing duplicates.


 

🧠 Advanced Level (30+ Exercises)

 

Goal: Apply advanced OOP, data structures, algorithms, and build complete systems.

 

Advanced OOP Concepts

  • Lab 44: Multiple inheritance example.

  • Lab 45: Friend class and friend function.

  • Lab 46: Static data and functions.

  • Lab 47: Deep copy vs shallow copy.

  • Lab 48: Pure virtual function and interface implementation.

Data Structures in C++

  • Lab 49: Singly Linked List – insertion/deletion.

  • Lab 50: Doubly Linked List – operations.

  • Lab 51: Stack implementation using arrays.

  • Lab 52: Queue using circular array.

  • Lab 53: Binary Search Tree – insertion/search.

Algorithms

  • Lab 54: Binary Search algorithm.

  • Lab 55: Merge Sort implementation.

  • Lab 56: Quick Sort.

  • Lab 57: Dijkstra’s shortest path.

  • Lab 58: Depth-first Search (DFS).

Exception Handling

  • Lab 59: Basic try-catch block.

  • Lab 60: Custom exception class.

  • Lab 61: Throwing exceptions in constructors.

Project-Oriented Tasks

  • Lab 62: Mini Library Management System.

  • Lab 63: Simple Banking System using OOP.

  • Lab 64: Employee Payroll System with file handling.

  • Lab 65: Vehicle Rental System.

  • Lab 66: Quiz application with question bank.


 

Tools & Environment

 

  • Compiler: GCC / Clang / MSVC

  • IDEs: Code::Blocks, VS Code, Dev C++

  • Libraries: STL, Boost (optional)

  • Operating System: Windows / Linux

  • Version Control: Git


 

🧪 Capstone Projects

 

  • Inventory Management System (OOP + Files + Pointers)

  • Hospital Management Console App

  • Student Database with STL Containers

  • Command-line ATM System

  • Maze Solver using DFS and Backtracking

Scroll to Top