Introduction to C++
Programming
Fundamentals of C++ for Beginners
Presented by: [Your Name]
What is C++?
• • General-purpose programming language
• • Developed by Bjarne Stroustrup in 1979
• • Combines procedural and object-oriented
paradigms
• • Known for performance and low-level
memory control
Key Features of C++
• • Object-Oriented Programming (OOP)
• • Strong type checking
• • Direct hardware access
• • Memory management via pointers
• • Standard Template Library (STL)
• • Fast execution speed
First C++ Program
• #include <iostream>
• using namespace std;
• int main() {
• cout << "Hello, World!";
• return 0;
• }
Data Types in C++
• • int - Integer (e.g., 10)
• • float - Decimal (e.g., 10.5)
• • char - Character (e.g., 'A')
• • bool - Boolean (true/false)
• • string - Text string (C++11+)
Control Structures
• if (x > 0) {
• cout << "Positive";
• } else {
• cout << "Non-positive";
• }
• for (int i = 0; i < 5; i++) {
• cout << i << " ";
• }
Functions in C++
• int add(int a, int b) {
• return a + b;
• }
• int main() {
• cout << add(3, 4);
• }
Object-Oriented Programming
• class Car {
• public:
• string brand;
• void honk() {
• cout << "Beep!";
• }
• };
• int main() {
Summary
• • Powerful, efficient programming language
• • Supports procedural and OOP
• • Covered: syntax, data types, control
structures, functions, classes
• • Used in game dev, embedded, and system
programming
Further Resources
• • https://cplusplus.com
• • https://w3schools.com/cpp/
• • Book: 'Programming Principles and Practice
Using C++' - Bjarne Stroustrup
Activity Question
• 🧠 **Challenge:**
• Write a C++ program that:
• - Asks the user to enter two numbers
• - Outputs their sum using a custom function
• 💡 Try it on your own, then compare with
peers!

Introduction_to_Cpp_with_Images_and_Activity.pptx

  • 1.
    Introduction to C++ Programming Fundamentalsof C++ for Beginners Presented by: [Your Name]
  • 2.
    What is C++? •• General-purpose programming language • • Developed by Bjarne Stroustrup in 1979 • • Combines procedural and object-oriented paradigms • • Known for performance and low-level memory control
  • 3.
    Key Features ofC++ • • Object-Oriented Programming (OOP) • • Strong type checking • • Direct hardware access • • Memory management via pointers • • Standard Template Library (STL) • • Fast execution speed
  • 4.
    First C++ Program •#include <iostream> • using namespace std; • int main() { • cout << "Hello, World!"; • return 0; • }
  • 5.
    Data Types inC++ • • int - Integer (e.g., 10) • • float - Decimal (e.g., 10.5) • • char - Character (e.g., 'A') • • bool - Boolean (true/false) • • string - Text string (C++11+)
  • 6.
    Control Structures • if(x > 0) { • cout << "Positive"; • } else { • cout << "Non-positive"; • } • for (int i = 0; i < 5; i++) { • cout << i << " "; • }
  • 7.
    Functions in C++ •int add(int a, int b) { • return a + b; • } • int main() { • cout << add(3, 4); • }
  • 8.
    Object-Oriented Programming • classCar { • public: • string brand; • void honk() { • cout << "Beep!"; • } • }; • int main() {
  • 9.
    Summary • • Powerful,efficient programming language • • Supports procedural and OOP • • Covered: syntax, data types, control structures, functions, classes • • Used in game dev, embedded, and system programming
  • 10.
    Further Resources • •https://cplusplus.com • • https://w3schools.com/cpp/ • • Book: 'Programming Principles and Practice Using C++' - Bjarne Stroustrup
  • 11.
    Activity Question • 🧠**Challenge:** • Write a C++ program that: • - Asks the user to enter two numbers • - Outputs their sum using a custom function • 💡 Try it on your own, then compare with peers!