Chapter_2-1programming[1]
Chapter_2-1programming[1]
April 5, 2025
C++ Programming Language
The C++ programming language was developed by Bjarne Stroustrup
at Bell Laboratories in 1971.
Since C++ is an attempt to add object oriented features to C the
developer named it C++.
Preprocessing
Compiling
Linking
Loading, and
Executing or running
NB: Keywords are always written or typed in short(lower) cases. In the above
figure some keywords are written in uppercase, they are incorrectly formatted.
04/05/2025
Fundaments of Programming
20
Scope of variable
A scope is a region of the program
Here,
x holds a positive-valued integer
y holds a negative-valued integer
z holds a zero-valued integer
04/05/2025 Fundaments of Programming 27
signed and unsigned Modifiers
The unsigned variables can hold only non-negative integer values. For
example,
Here,
x holds a positive-valued integer
y holds zero
In C++ program we can define constants in two ways as shown below:
Symbols Descriptions
+ addition
- subtraction
* multiplication
/ division
% modulo
c++;
c+=1;
c=c+1;
are all equivalent in its functionality: the three of them increase by one the
value of c.
04/05/2025 Fundaments of Programming 38
Exmaple