Professional Documents
Culture Documents
Engineering Notes
Engineering Notes
Engineering Notes
LAB REPORT #3
Submitted by;
Section : A
Class no: 20
Submitted to;
Dr Fakhar Alam
15-10-2019
Objective of lab:
Title:
Define and explain variables, constants and different operators in C++ programming.
1. Variables:
“In C++ a variable is used to store data in memory location, which can be used or modified during
programexecution.”
Variables play a significant role in constructing a program, storing values in memory and dealing with them.
Variables are required in various functions of every program. For example, when we check for conditions to execute
a block of statements, variables are required. Again for iterating or repeating a block of the statement(s) several
times, a counter variable is set along with a condition, or simply if we store the age of an employee, we need an
integer type variable. So in every respect, the variable is used.