0% found this document useful (0 votes)
86 views12 pages

CPP Notes Full Course CodeWithHarry

Uploaded by

skkumarsv786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views12 pages

CPP Notes Full Course CodeWithHarry

Uploaded by

skkumarsv786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 3: Control Flow

Control Flow
Control flow statements decide the order in which statements are executed.

if-else Statement
Executes a block of code if condition is true, else executes another block.

switch Statement
Allows multiple choices based on value of a variable.

Loops
for, while, do-while loops for repeated execution.

Break & Continue


break exits the loop, continue skips current iteration.
Chapter 4: Functions

Functions
Functions are reusable blocks of code that perform a specific task.

Function Declaration & Definition


Declare before use; define the logic inside function.

Default Arguments & Inline Functions


Default args allow skipping parameters; inline reduces function call overhead.

Function Overloading & Recursion


Same function name with different parameters; recursion is function calling itself.
Chapter 5: Arrays & Strings

Arrays & Strings


Arrays store multiple elements of same type; strings are sequences of characters.

1D & 2D Arrays
1D is single row; 2D is table-like structure.

String Class & Methods


std::string provides many utility methods like length(), substr(), etc.
Chapter 6: Pointers

Pointers
Pointers store memory addresses of variables.

Pointer Arithmetic & Arrays


Pointers can traverse arrays using arithmetic.

Pointers with Functions & Dynamic Memory


Pass pointers to functions; use new/delete for dynamic allocation.
Chapter 7: Structures, Unions & Enums

Structures, Unions & Enums


Structures group variables; unions share memory; enums define named constants.
Chapter 8: OOP Basics

OOP Basics
Classes & Objects are central; encapsulation through access specifiers.

Constructors & Destructors


Special functions called at creation/destruction of objects.

Static & Friend Functions


Static members shared by all objects; friend functions can access private data.
Chapter 9: Inheritance

Inheritance
Allows a class to derive properties of another class.

Types of Inheritance
Single, Multiple, Multilevel, Hierarchical, Hybrid

Function Overriding & Virtual Base Classes


Override parent functions; virtual base avoids duplication.
Chapter 10: Polymorphism

Polymorphism
Ability of one interface to support multiple implementations.

Compile-time: Function/Operator Overloading


Same function/operator with different parameters.

Runtime: Virtual Functions & Abstract Classes


Virtual functions resolved at runtime; abstract classes have pure virtual functions.
Chapter 11: File Handling

File Handling
Read/write data to files using fstream, ifstream, ofstream.

File Modes & Methods


ios::in, ios::out; eof(), seekg(), seekp()
Chapter 12: Templates & Exception Handling

Templates & Exception Handling


Templates allow generic programming; exceptions handle errors.

Try, Catch, Throw


Handle runtime errors gracefully.
Chapter 13: STL (Vectors, Lists, Maps, Stacks, Queues,
Algorithms)

STL (Standard Template Library)


Prebuilt classes & functions: vectors, lists, maps, stacks, queues, algorithms.

Iterators & Algorithms


Traverse containers; algorithms like sort(), find(), etc.
Chapter 14: Projects & Practice

Projects & Practice


Mini projects and exercises to apply concepts.

Placement Tips
Harry shares coding, problem-solving, and interview advice.

You might also like