ADVANCED TOPICS IN COMPILER DESIGN
CODE GENERATION FOR OBJECT ORIENTED LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
False
|
|
True
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -Variables are used to store information to be referenced and manipulated in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold information.
Detailed explanation-2: -A constant is a data item whose value cannot change during the program’s execution. Thus, as its name implies – the value is constant. A variable is a data item whose value can change during the program’s execution. Thus, as its name implies – the value can vary.
Detailed explanation-3: -Notice that variables are used for temporary storage. When you exit a program or turn the computer off, the information in variables is lost. Permanent storage is a different matter. Typically, the values from variables are permanently stored either to a database or to a file on disk.
Detailed explanation-4: -Answer: True, because variable can store any value.