Programming in C, Variables, Numeric Variable, Character Variable.

Question 1:Describe the purpose of variables.

Ans: A variable is a symbolic name that represents a value that can change during execution of a program. A variable has a name, known as variable name and it hold data of other types.

These are called memory locations.

Variables are of two types.

1. Numeric Variable

2. Character Variable

Variables


Question 2: What is the difference between numeric and character variable?

Ans: Numeric variables are used to represent numeric values in

computer programs. e.g: sum, avg, marks, etc

Character variables represent character values in computer

program. It can represent a single character or a string of

characters. e.g: city, gender etc.

Comments

Popular posts from this blog

Conditional Control structure. Chapter 4, Lab Activities, Long questions.

Chapter # 5, Loop Control Structure, Lab Activities