Engineering Notes

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Department of Mechanical Engineering,

University of Engineering & Technology


Main campus Peshawar.

LAB REPORT #3

Submitted by;

Name : Musaddiq Ahmad

Section : A

Class no: 20

Registration no: 00486

Submitted to;

Dr Fakhar Alam

Lab Date Marks & signature

15-10-2019
Objective of lab:

 To learn the concept of variables, constants and operators in C++ programing.

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.

 Terms associated with variables:


a) Name of variable:
It is the identifier which represents a variable.
b) Address of variable:
it specifies the memory location of variable.
c) Contents of variables:

You might also like