The value of X is 7. Some computer languages (or notations) interpret X+1 as 8 and others interpret it as Y. Why?
What will be an ideal response?
In everyday life (i.e., natural language), we do not distinguish between the name of a variable, its address, and its value. When we say, X = X + 1, we mean that the value we have given the variable X is incremented by 1 to become 8. X is the name of the variable whose value is 7.
If we regard X as the representation of the character X, then X is 0x58 (the ASCII code for X). Adding 1 to X gives us 0x59 which is the ASCII code for Y.
Some computer languages allow you to operate on the name of a variable. This question demonstrates that it is important to appreciate the difference between name, address, and value.
You might also like to view...
Suppose we want to override a function called foo in a base class called Bar, and we are writing a function foo for the derived class. As part of the function definition for foo in the derived class, we wish to call the function foo in the base class, which has no parameters. The expression to call the foo function in the base class (within a line of code) would look like this:
A. base::foo( ) B. Bar::foo( ) C. foo( ) D. Bar b.foo( )
Which of the following is NOT an IIf function argument?
A) truepart B) falsepart C) logical test D) expr
Over time, DRAM chips lose their charge. The process of rewriting the information is called
A) Refreshing B) Pipelining C) Memory extension D) Virtual memory management
When an IDE PATA optical drive connects to the same cable as a faster hard drive, a technician should set the optical drive to the _______ setting
Fill in the blank(s) with correct word