Cpp Notes
Cpp Notes
Data Types
Data types specify the type of data a variable can hold in C++. Common data types include int,
float, char, bool, and double.
Common Mistakes:
Assigning values exceeding the range of a data type (e.g., assigning a large number to int).
Common Mistakes:
3. Operators
Operators perform operations on variables and values. They include arithmetic, assignment and
logical.
Common Mistakes:
Common Mistakes:
cin and cout are used for input and output operations in C++.
Common Mistakes:
6. Conditional Statements
Conditional statements (if, else, else if) are used to make decisions based on conditions.
Common Mistakes:
7. Loops
While Loop:
Common Mistakes:
Infinite loops due to incorrect conditions.
Do-While Loop
Common Mistakes:
For Loop
Common Mistakes:
8. Arrays
Common Mistakes:
Common Mistakes:
Common Mistakes:
11. Functions
Common Mistakes: