Day 1: Introduction to C++ & Fundamental Programming Concepts
Objective: Introduce C++ basics and set up the development environment.
- Introduction to Programming and C++
- What is programming?
- Why learn C++? (Real-life examples: games, embedded systems)
- Overview of C++ as a compiled language.
- Setting Up the Environment
- Installing Code::Blocks or Visual Studio.
- Writing and running the first program: "Hello, World!".
- Basic Structure of a C++ Program
- Explanation of
#include
, int main()
, and {}
.
- Writing simple programs to display text.
- Variables and Data Types
- Concept of variables (e.g., storing a person’s age or marks).
- Common data types:
int
, float
, char
, bool
.
- Using
cout
and cin
for input and output.
Day 2: Control Flow and Loops
Objective: Teach students to control the flow of a program using decision-making and loops.
- If-Else Statements
- Syntax and flow.
- Examples: Checking if a number is positive or negative.
- Loops in C++
- For Loop: Printing numbers from 1 to 10.
- While Loop: Summing numbers up to a given limit.
- Do-While Loop: Ensuring user input is valid (e.g., guessing a number).
- Basic Arithmetic Operations
- Writing small programs to perform addition, subtraction, multiplication, and division.
- Example: A simple calculator using loops.
Day 3: Arrays and Functions
Objective: Introduce arrays and functions to demonstrate modular programming.
- Introduction to Arrays
- What is an array? (e.g., storing the marks of 5 students).
- Defining and accessing array elements.
- Simple example: Summing the elements of an array.