COMPUTER PROGRAMMING FUNDAMENTALS
WHAT IS PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
literal
|
|
sentinel
|
|
variable
|
|
constant
|
Detailed explanation-1: -Answer: A variable is a named memory location which temporarily stores data that can change while the program is running. A constant is a named memory location which temporarily stores data that remains the same throughout the execution of the program.
Detailed explanation-2: -A variable is a named location in the computer’s memory, used to store a piece data (or information).
Detailed explanation-3: -Constant is a named memory location used to hold a value that CANNOT be changed during the script execution. If a user tries to change a Constant value, the script execution ends up with an error. Constants are declared the same way the variables are declared.
Detailed explanation-4: -Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory.