Difference Between Constant and Variable

Q#1: Differentiate between constant and variable. 

Ans:  

Constant

Variable

A constant does not change its value during program execution.

A variable changes its value depending on instructions.

Constants are usually written in numbers and may be defined in identifiers.

Variables are always written in letters or symbols.

Constants usually represent the known values in an equation, expression or in line of programming.

Variables represents the unknown values.

Comments

Popular posts from this blog

Chapter # 3 Class IX

Components of Motherboard

Problem Solving Steps