100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CSE 240 Final UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
13
Grade
A+
Uploaded on
20-08-2025
Written in
2025/2026

CSE 240 Final UPDATED ACTUAL Exam Questions and CORRECT Answers Functional programming languages do NOT allow us to define - CORRECT ANSWER - variables whose value can be modified. Which of the following is a valid Scheme expression? - CORRECT ANSWER - (* 9 (/ (- 4 2) 7)) paren always around symbols

Show more Read less
Institution
CSE 240
Course
CSE 240









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CSE 240
Course
CSE 240

Document information

Uploaded on
August 20, 2025
Number of pages
13
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

CSE 240 Final UPDATED ACTUAL Exam
Questions and CORRECT Answers
Functional programming languages do NOT allow us to define - CORRECT ANSWER -
variables whose value can be modified.


Which of the following is a valid Scheme expression? - CORRECT ANSWER - (* 9 (/ (- 4 2)
7)) paren always around symbols


In Scheme, the form (symbol-length? 'James) will return: - CORRECT ANSWER - an error
message


Convert the following expression into prefix-p notation (a Scheme statement):


-5 * (2 + 1/2) + 40 - CORRECT ANSWER - (+ (* (- 5) (+ 2 (/ 1 2))) 40)


The statement "a function is a first-class object" means that a function - CORRECT
ANSWER - 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 ANSWER - infix notation


Convert the following expression into prefix-p notation (a Scheme statement):


10 + (5 - 3) + - CORRECT ANSWER - (+ 10 (- 5 3) (/ 2 4))



Which of the following expression will return false (#f)? - CORRECT ANSWER - (number?
#\7)

, The Scheme form (char? #\5) will return - CORRECT ANSWER - true (#t)


How would Scheme implement a function such as: for (i = 1; i< 100, i++) {sum = sum + i;} -
CORRECT ANSWER - With recursion.


A student is wondering if Scheme is a strong or weakly typed language. How might they check
this? Select all that apply - CORRECT ANSWER - They could execute a form like (+ #\a 10)
in the REPL. If it works (like in C), then it is probably weakly typed.


What data structure is used in Scheme for representing extremely large integers? - CORRECT
ANSWER - probably a list. Really: we shouldn't know or care.


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 ANSWER - Scheme


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 ANSWER - "I'm a number"


What statements contain non-functional features of Scheme? Select all that apply. - CORRECT
ANSWER - (begin (write x) x)
(display x)


A let-form in Scheme defines a set of - CORRECT ANSWER - local names.


What functional feature does the code below best exhibit?

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MGRADES Stanford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1067
Member since
1 year
Number of followers
102
Documents
68976
Last sold
15 hours ago
MGRADES (Stanford Top Brains)

Welcome to MGRADES Exams, practices and Study materials Just think of me as the plug you will refer to your friends Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

168 reviews

5
73
4
30
3
43
2
8
1
14

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions