Variables

Programmers often think of variable names as names for memory locations, but there is much more to a variable than just a name.

download Export
search_insights Statistics
stylus_note White Board
Quran
calculate Calculator
dictionary Dictionary
fullscreen Full Screen

QUESTION OF
Views #: 550
Questions #: 10
Pass Score: 80.0%
Style
Mode

A program variable is an abstraction of a computer memory cell or collection of cells.

1 pts
volume_mute
note_alt Add notes
flag Flag

Correct Answer

Explanation

A variable can be characterized as a sextuple of attributes

1 pts
volume_mute

(name, address, value, type, lifetime, and scope)

note_alt Add notes
flag Flag

Correct Answer

Explanation

A program variable is not associated with a machine address

1 pts
volume_mute
note_alt Add notes
flag Flag

Correct Answer

Explanation

In many languages, it is possible for the same variable to be associated with different addresses at different times in the program

1 pts
volume_mute
note_alt Add notes
flag Flag

Correct Answer

Explanation

A memory address in the program can be accessed by

1 pts
volume_mute
note_alt Add notes
flag Flag

Correct Answer

Explanation

Two variables are aliases

1 pts
volume_mute

Variable named sum and totalwhere both are aliases.  If the following operations are made to total, what is the value of sum?

sum = 1
total = 2
total = total + 3
note_alt Add notes
flag Flag

Correct Answer

Explanation

A value of a variable is stored in exactly a single physical memory cell

1 pts
volume_mute
note_alt Add notes
flag Flag

Correct Answer

Explanation

In Java, a declared variable rose is same as variable ROSE

1 pts
volume_mute
note_alt Add notes
flag Flag

Correct Answer

Explanation

In C++, pointer variables and references

1 pts
volume_mute

Two pointer variables are aliases when they point to the same memory location. The same is true for reference variables.

note_alt Add notes
flag Flag

Correct Answer

Explanation

In C and C++, union types can be used to create aliases in a program

1 pts
volume_mute
note_alt Add notes
flag Flag

Correct Answer

Explanation

Keywords
Year 10