CSE 240 Final Exam Review Questions with Complete Solutions (Latest 2025) Functional programming languages do NOT allow us to
define: - Correct Answers ✅variables whose value can be
modified.The statement "a function is a first-class object" means that a function - Correct Answers ✅can be placed in a place where a value is expected.What notation requires parentheses in order to correctly define the order of computation? - Correct Answers ✅infix notation Convert the following expression into prefix-p notation (a
Scheme statement):
-5 * (2 + 1/2) + 40 - Correct Answers ✅(+ (* (- 5) (+ 2 (/ 1
2))) 40)
One of the major differences between the imperative and functional programming languages is that the functional programming languages do NOT (in general!)... - Correct Answers ✅have side-effects.Which of the following is a valid Scheme expression? - Correct Answers ✅(* 9 (/ (- 4 2) 7)) 1 / 3
CSE 240 Final Exam Review Questions with Complete Solutions (Latest 2025) Convert the following expression into prefix-p notation (a
Scheme statement):
10 + (5 - 3) + 2 / 4 - Correct Answers ✅(+ 10 (- 5 3) (/ 2 4))
Given an expression: x1 + x2 + x3 + x4
Which language allows us to evaluate the expression in this
order: (1) x1 plus x2; (2) x3 plus x4; (3) sum of ( x1 + x2 )
plus sum of ( x3 + x4 ), without concern for producing a
different result than other evaluation orders: - Correct
Answers ✅Scheme What is the expected result for this expression (in Scheme)?(string-ref "Hello World" 4) - Correct Answers ✅#\o Which of the following expression will return false (#f)? - Correct Answers ✅(number? #\7) Given this procedure, what is the return result?(define (guess value) (cond ((number? value) "I'm a number") ((char? value) "I'm a character") ((integer? value) "I'm a integer"))) (guess 10) - Correct Answers ✅"I'm a number" 2 / 3
CSE 240 Final Exam Review Questions with Complete Solutions (Latest 2025) Which of the following are typical advantages of using a REPL for software development? - Correct Answers ✅They let you interact with a program after it has populated the environment to understand what is happening.They let you experiment with small pieces of code to understand how they work.What data structure is used in Scheme for representing extremely large integers? - Correct Answers ✅probably a
list. Really: we shouldn't know or care.
The Scheme form (char? #\5) will return - Correct Answers ✅true (#t) What statements contain non-functional features of Scheme?Select all that apply. - Correct Answers ✅(begin (write x) x) (display x) What functional feature does the code below best exhibit?(define start-engine (lambda ()
- / 3