1-10: Basic Syntax
int
: A fundamental data type used to declare integer variables.float
: A floating-point data type for decimal values.double
: Double-precision floating-point numbers, more accurate thanfloat
.char
: Used for storing single characters.bool
: Represents Boolean values (true
orfalse
).void
: Denotes no return value for a function.if
: Conditional statement that executes code based on a condition.else
: Provides an alternative block of code when anif
condition is false.switch
: A control statement that selects one of many code blocks to execute.for
: A loop that repeats code a specified number of times.
Reference: C++ Basics – GeeksforGeeks
11-20: Advanced Data Types
struct
: A collection of variables grouped under one name.class
: Blueprint for objects, bundling methods and attributes.union
: A data structure where all members share the same memory location.enum
: Defines a set of named integral constants.array
: A collection of variables of the same type stored at contiguous memory locations.string
: Represents sequences of characters, commonly used from the Standard Template Library (STL).vector
: A dynamic array provided by the STL.list
: Doubly linked list in STL, allowing insertion and deletion anywhere.map
: A key-value pair container in STL.pair
: A container for two values.
Reference: STL Containers – CPlusPlus
21-30: Input/Output
cin
: Standard input stream.cout
: Standard output stream.cerr
: Standard error stream.clog
: Standard log stream.endl
: Ends a line in output and flushes the stream.gets
: Reads a string until a newline character (not safe to use due to buffer overflow risks).puts
: Outputs a string followed by a newline.getline()
: Reads a full line of input, including spaces.fprintf
: Prints formatted output to a file.fscanf
: Reads formatted input from a file.
Reference: C++ Input/Output – CPlusPlus
31-40: Operators
+
: Addition operator.-
: Subtraction operator.*
: Multiplication operator./
: Division operator.%
: Modulus operator (remainder of division).++
: Increment operator.--
: Decrement operator.&&
: Logical AND operator.||
: Logical OR operator.!
: Logical NOT operator.
Reference: C++ Operators – Programiz
41-50: Control Flow
while
: Repeats a block of code while a condition is true.do-while
: Similar towhile
, but checks the condition after executing the loop.break
: Terminates a loop orswitch
statement.continue
: Skips the current iteration of a loop.goto
: Jumps to another point in the program.return
: Exits a function and optionally returns a value.try
: Starts a block of code for exception handling.catch
: Handles exceptions thrown bytry
.throw
: Throws an exception.exit()
: Terminates a program.
Reference: Control Statements – GeeksforGeeks
51-60: Functions
main()
: The entry point of a C++ program.inline
: Suggests that the compiler replaces a function call with the function’s code to optimize performance.const
: Declares variables or parameters as constant.static
: Keeps a local variable’s value between function calls or restricts the visibility of a variable or function to a file.friend
: Allows a function or class to access private and protected members of another class.virtual
: Allows a function to be overridden in derived classes.overloading
: Multiple functions can have the same name with different parameters.template
: Allows writing generic programs.recursion
: A function that calls itself.lambda
: An anonymous function that can be defined inline.
Reference: C++ Functions – TutorialsPoint
61-70: Pointers & References
&
: Address-of operator, used to get the memory address of a variable.*
: Dereference operator, used to access the value at the address pointed to by a pointer.nullptr
: Represents a null pointer.new
: Allocates memory dynamically.delete
: Frees memory allocated bynew
.reference
: An alias for another variable.pointer
: Stores the address of a variable.smart pointer
: Automatically manages memory, likestd::unique_ptr
andstd::shared_ptr
.dangling pointer
: A pointer that no longer points to valid memory.memory leak
: Occurs when dynamically allocated memory is not properly freed.
Reference: C++ Pointers – Programiz
71-80: Object-Oriented Programming (OOP)
constructor
: Initializes an object.destructor
: Cleans up when an object goes out of scope.inheritance
: Deriving a class from another class.polymorphism
: Allows one interface to be used for different data types.abstraction
: Hiding implementation details from the user.encapsulation
: Wrapping data and methods into a single unit or class.overriding
: Redefining a base class’s method in a derived class.this
: Pointer to the current object.operator overloading
: Defining how operators work for user-defined types.multiple inheritance
: A class can inherit from more than one base class.
Reference: OOP in C++ – GeeksforGeeks
81-90: Standard Template Library (STL)
algorithm
: A header that includes many common algorithms likesort()
,find()
, etc.vector
: Dynamic array.deque
: Double-ended queue.stack
: Last-in, first-out container.queue
: First-in, first-out container.priority_queue
: A heap-based queue.set
: Collection of unique elements.multiset
: Collection of non-unique elements.map
: Key-value pair container.unordered_map
: Hash-based key-value container.
Reference: C++ STL – CPlusPlus
91-100: Miscellaneous
namespace
: Avoids name conflicts by organizing code into logical groups.typedef
: Defines a new name for an existing type.typeid
: Provides runtime type information.auto
: Automatically deduces the type of a variable.decltype
: Deduces the type of an expression.constexpr
: Used to define constant expressions.static_cast
: A type cast used for well-defined conversions.dynamic_cast
: Safely casts between base and derived classes.mutable
: Allows a class member to be modified, even if the object isconst
.volatile
: Tells the compiler that a variable can be changed unexpectedly, such as in a multi-threaded environment.
Reference: [C++ Advanced Concepts – Programiz](https://www.programiz.com/cpp-programming