Multiple choice technology programming languages

Which of the following codes will NOT give an error? (i) (display '(1 2 3)) (ii) (display (* (exp 5 2) 2)) (iii) (display (* (expt 5 2) 2)) (iv) (display (+ 5 (display (* 4 2))))

  1. (i) & (ii)

  2. (i) & (iii)

  3. (i) only

  4. (i), (iii) & (iv)

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

(i) works - display can print quoted lists. (iii) works - expt is the correct Scheme exponent function. (ii) fails - exp is not exponent (it's e^x). (iv) fails - nested display returns void/undefined, breaking the outer addition.