What is Variable?
•Variables are location in memory where a
program keeps data when a program start execution with takes I/P form the user
& keep that’s I/P into the variable.
Variable Declaration:
As the programmer you need to define
statement in the program so that Run Time Environment can allocate memory
location to the program to store data.
•These statements are called variable
declaration statements.
Syntax
•Datatype
variable_name;
•int
num;
•float avg;
Variable Initialization:
The process to store a value in a variable
for the first time is known as variable initialization.
•int num=30;
No comments:
Post a Comment