HTTP/1.0 200 OK Content-type: text/html Test 4 - Constants

,6/1 11:37 CDT,Due date-->9/20/2000 10:00 CDT

  1. Which of the following characters denotes a string constant?
    1) ' 2) # 3) " 4) <<

  2. Which of the following is a repeating fraction in decimal?
    1) 1/3 2) 1/5 3) 1/7 4) 1/9

  3. An integer can be written as 22 (decimal) or 0x16 (hex). What does print(22,0x16) output?

    1) 2216 2) 22 0x16 3) 22 22 4) 2222

  4. What's the output for print(123456789)?
    1) errors detected 2) 123456789 3) too big 4) 12345*****

  5. A real number can be written as 23.68 or 2.368e+1. Check all the following numbers that are equivalent.
    1) 2367.0 2) 2.367e+2 3) 0.23670e+4 4) 23.67e+2 5) 0.2367e+4 6) 23.67e-1

  6. Which of the following is a repeating fraction in binary?
    1) 0.1 2) 0.2 3) 0.3 4) 0.4

  7. Which of the following is a Boolean constant?
    1) true 2) nil 3) T 4) ok

  8. Which symbols enclose a multi-line string constant?
    1) (()) 2) [[]] 3) {{}} 4) ""

  9. Which of the following marks the beginning of a comment?
    1) /* 2) // 3) -- 4) [-

  10. Which of the following is the string.format for integer output?
    1) %i 2) %w 3) %e 4) %d

  11. Which of the following is the string.format for real number output?
    1) %f 2) %g 3) %e