This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 4
August 29, 1997
#1. What is the result of the division 7.0 / 4.0 ?
#2. What is the result of the division 7 / 4 ?
#3. Assume the following Java code has been executed:
String name = "University";
String letters = name.substring (1,4);
What is the contents of the variable letters?
#4. Assume a computer has the following machine instructions, coded as numbers:
Further, assume that the contents of register AX is unknown. You have access to only two memory locations, location zero containing a variable named "amount" and location one containing a variable named "count". Without destroying the contents of the variable "amount" add one to the contents of "count".