Multiple choice technology programming languages

(string-set! "DrScheme" 2 4) what will be the output?

  1. DrScheme

  2. Sh

  3. Error : string-set! accepts 1 argument, given 3

  4. Error: string-set!: expects type <mutable string> as 1st argument, given "DrScheme"

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

string-set! modifies a string character in-place. However, string literals like "DrScheme" are immutable (cannot be changed). The function expects a mutable string, but a string literal is immutable. Hence the error about expecting a mutable string.