Programming ||
Winter 2025
Musa Hodman
Lecture 01
C++ Programming: The Basics
1
Road Map
Programming Languages
Brief History of C/C++ Programming Languages
C++ and Generic Programming
Portability and Standards
The Process of Creating a program in C++
Parts of Source Code in C++
Exercise
End
2
Programming Language
3
Programming Languages
4
Machine Language
5
Assembly Language
6
High Level Language
7
High Level Language
8
Procedural Programming
Procedural programming uses a list of instructions to tell
the computer what to do step-by-step.
Procedural programming relies on what you guessed it –
procedures, also known as routines or subroutines
Uses Top Down Approach
Block branching while for and switch statements
9
Object-Oriented Programming OOP
Object-oriented Programming, or OOP, is an approach to
problem-solving where all computations are carried out
using objects
An object is a component of a program that knows how
to perform certain actions and how to interact with other
elements of the program.
Bottom-up Approach
Objects are like instances of class
10
POP Vs. OOP
11
C programming Language
The origin of C is closely tied to the development of the
Unix operating system.
Invented by Dennis Ritchie in 1972 AT & T Bell Bell Labs
C is a procedural or Algorithmic Programming Language
12
Procedural or Algorithmic programming language
13
C++ Programming Language
C++ is an object oriented programming, although
procedural Programming language solved majority of the
problems but still some complex challenges remains
which cannot be solved with structural programming
language.
14
Innovation of C++
Bjarne Stroustrup, a Danish computer scientist, began his
work on C++ predecessor “C with Classes” in 1979.
He was researching for his thesis while facing difficulties
analyzing Linux Kernel.
Bjarne Stroustrup enhanced C by adding more features to it.
In 1983, it was renamed from C with classes to C++ (++
being increment Operator in C).
15
C++ Features
Convenient language
Standard Libraries
Well Structred language
Hardware Control
Case Sensitivity
Speed
Machine independence
Popular Language
Object Oriented
C Compatibility
Modular Programming
16
Benefit of Using OOP over Structural Programming
Language
17
OOP features
18
C++ and Generic Programming
19
Portability and Standards
20
C++ standards
21
Steps throughout Code Execution
23
Steps throughout Code Execution
24
Writing source code
25
Integrated Development Environment (IDE)
26
Preprocessor Directives
27
Simple Hello World program
28
C++ Syntax
29
Features of the main()
30
Input output statements in c++
31
Exercis
e
Write a C++ program to print the following lines:
You are 10 years old.
You are too young to play the game.
32
Any
33