Unformatted text preview: he game is over.
This program is a computer game. Please, type in
an integer in the range 1 ... 2147483646 : 2147483647
You typed in 2147483647.
My number is -2147483648.
Sorry, you lost. I won. The game is over. Game.java - X. In the second execution too large an input value is given to the program. 104 Chapter 5: Variables and other basic elements in Java programs ,
We can think that the main memory of a computer is a long list of
single-byte memory cells, and each byte has a unique address. I have
written here "fictitious" hexadecimal memory addresses. The
addresses are fictitious because we do not usually know, and we do
not need to know, the numerical memory addresses of variables.
Here we suppose that these four bytes of memory are reserved for
variable one_larger_integer. We can say that variable
one_larger_integer is in memory address 12F8C0H. The contents of the memory locations are marked with ??H because right
after their declaration the variables have unspecified values. We have here...
View Full Document
- Winter '14
- Computer Programming, main memory, Computer program