Quiz # 1

AMES 5

Quantitative Computer Skills

Quiz 1, January 7, 1999

(closed book, closed notes, Scantron form #20788-ERI, StudentID, CodeWord)

 

1. True BASIC is one of the first commercial versions of the Full BASIC programming language conforming to ANS BASIC standards. BASIC is one of the most widely used programming languages, and was first developed at Dartmouth College in:

(a) 1946 (b) 1996 (c) 1974 (d) 1964 (e) 1994.

2. Computers store information in bits and bytes. A bit is either 0 or 1 (false or true, off or on). If the bit is off, it represents the number zero. If it is on, it represents the number one. Thus it stores numbers in the range zero to 21 - 1 = 1. A byte is 8 bits, and can store numbers in the range zero to 28 -1. Therefore the largest number that can be stored in a byte is zero to:

(a) 8 (b) 28 (c) 204 (d) 255 (e) 127.

3. There is a difference between a text file and a binary file:

(a) true (b) false.

4. True BASIC is case sensitive. It is important to give the command PRINT instead of the command print. The numeric variable M is different from the numeric variable m:

(a) true (b) false.

5. The output of the program PRINT hello! (with an END statement following) is:

(a) hello! (b) 0 (c) hello (d) an error message (e) disaster.

6. The output of the program PRINT "hello!" ! print a line (with an END statement following) is:

(a) hello! (b) 0 (c) hello (d) an error message (e) disaster.

7. The output of the program PRINT "hello!" REM print a line (with an END statement following) is:

(a) hello! (b) 0 (c) hello (d) an error message (e) disaster.

8. The output of the program REM print a line (next line) PRINT "hello!" (next line) END is:

(a) hello! (b) 0 (c) hello (d) an error message (e) disaster.

9. All programs must contain the following command or they won't run:

(a) hello! (b) PRINT (c) END (d) REM (e) SudentID.

10. The command INPUT name$ produces a question mark and expects you to type in a value for name$. What is name$?

(a) a numeric variable (b) a string variable (c) a numeric constant (d) a string constant (e) George.