Explain the features of variables.
Advertisements
Question
Explain the features of variables.
Explain
Advertisements
Solution
- Variable Name: Every variable has a unique name within its scope, which is used to identify and access its value.
- Data Type: Each variable has a specific data type that determines the kind of value it can store.
- Memory Allocation: Variables are allocated memory according to their data types.
- Changeable Value: The value of a variable can be changed during program execution.
- Declaration: A variable must be declared with a data type before it is used.
- Scope: The scope of a variable determines where it can be accessed within a program.
- Initialisation: A variable can be assigned an initial value at the time of declaration or later, before its value is used.
shaalaa.com
Is there an error in this question or solution?
