15-Day C++ Mastery Plan (12+ Hours/Day)
**Goal**: *Complete understanding of all CLOs (Course Learning Outcomes) and PLOs
(Program Learning Outcomes) in the syllabus.*
Day 1-2: C++ Basics & Program Structure
Topics:
- Hello World, compilation process (preprocessor → linker → loader).
- Variables, data types (`int`, `float`, `char`, `bool`), escape sequences (`\n`, `\t`).
- I/O (`cin`, `cout`), operators (`+`, `-`, `%`, `++`, `--`), precedence rules.
Deep Dive:
- How variables are stored in memory (stack vs. heap).
- Difference between `++i` (prefix) and `i++` (postfix).
Practice:
1. Write a program to calculate area of a circle.
2. Swap two numbers without a temporary variable.
Day 3-4: Control Structures (Loops & Conditionals)
Topics:
- `if-else`, `switch-case`, ternary operator.
- `while`, `do-while`, `for` loops, nested loops.
- `break`, `continue`, `goto` (avoid in practice).
Deep Dive:
- Compare `while` vs. `do-while` (when to use which?).
- Time complexity of nested loops (O(n²) example).
Practice:
1. Print Fibonacci series up to `n` terms.
2. Find prime numbers in a range.
Day 5-6: Functions & Modular Programming
Topics:
- Function declaration, definition, prototypes.
- Parameter passing (by value, by reference).
- Return types, recursion, inline functions.
Deep Dive:
- How call stack works during recursion.
- Why `inline` functions reduce overhead.
Practice:
1. Write a recursive factorial function.
2. Implement a function to check if a number is a palindrome.
Day 7-8: Arrays & Pointers (Memory Mastery)
Topics:
- 1D/2D arrays, initialization, traversal.
- Pointers, pointer arithmetic, dynamic memory (`new`, `delete`).
- Array-pointer relationship (`arr[i]` vs. `*(arr + i)`).
Deep Dive:
- How 2D arrays are stored in row-major order.
- Dangling pointers and memory leaks.
Practice:
1. Reverse an array using pointers.
2. Transpose a 2D matrix.
Day 9-10: Structures & File Handling
Topics:
- `struct` syntax, accessing members, nested structures.
- File I/O (`fstream`, `open()`, `read()`, `write()`).
- Text vs. binary files.
Deep Dive:
- Difference between `struct` and `class` (default public vs. private).
- How binary files save memory compared to text.
Practice:
1. Store student records (name, roll no) in a file.
2. Read and display records from the file.
Day 11-12: Advanced Topics (Dynamic Memory, Preprocessor)
Topics:
- Dynamic arrays (`new int[n]`), memory management.
- Macros (`#define`), `typedef`, `const`.
Deep Dive:
- Why `malloc()` (C) is different from `new` (C++).
- Pros/cons of macros vs. inline functions.
Practice:
1. Create a dynamic array and sort it.
2. Use macros to define a constant `PI`.
Day 13-14: Revision & Mock Exams
- Revisit all topics, solve past papers.
- Debugging practice: Fix broken code snippets.
- Speed coding: Solve problems under time pressure.
Day 15: Final Touches
- Ethics/Plagiarism Policy (from your PDF).
- Exam strategy: Time allocation per question.
Pro Tips for Maximum Retention
1. Pomodoro Technique: 50 mins study → 10 mins break.
2. Feynman Technique: Teach concepts aloud as if explaining to a beginner.
3. Leetcode/Easy Problems: For extra practice (e.g., "Two Sum").
Recommended Resources
1. Books:
- Starting Out with C++ (Tony Gaddis) – For basics.
- C++ Primer (Lippman) – For deep dives.
2. Websites:
- [Programiz C++](https://www.programiz.com/cpp-programming)
- [GeeksforGeeks C++](https://www.geeksforgeeks.org/c-plus-plus/)
Final Motivation
You’re not just preparing for an exam—you’re building a foundation for software
engineering. Stay disciplined, and in 15 days, you’ll code with confidence!