CSE240 FINAL EXAM QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS VERIFIED
7 views 0 purchase
Module
CSE240
Institution
CSE240
CSE240 FINAL EXAM QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS VERIFIED
In scheme, the form(symbol-length? 'James) will return:
a. an error message
b. 5
c. 0
d. 7
e. 6
a
Functional programming languages do NOT allow us to define
a. procedures
b. multiple parameters in one procedure
...
cse240 final exam questions and answers with compl
Written for
CSE240
All documents for this subject (20)
Seller
Follow
NurseAdvocate
Reviews received
Content preview
CSE240 FINAL EXAM QUESTIONS AND ANSWERS WITH
COMPLETE SOLUTIONS VERIFIED
In scheme, the form(symbol-length? 'James) will return:
a. an error message
b. 5
c. 0
d. 7
e. 6
a
Functional programming languages do NOT allow us to define
a. procedures
b. multiple parameters in one procedure
c. variables whose value can be modified
d. named values
c
convert the following expression into prefix-p notation
-5 * (2 + 1/2) + 40
a. (+(*(-5)(+ 2(/ 1 2)))40)
b.(-5 *(2+1/2)+40)
,c. (* (+(-5)(/2 (+1 2)))40)
d.+*-5+2/1 2 40
a
convert following exp into pre-fix p
10 + (5-3) +
a. + 10 - 5 4
b. (/ (+ 10(- 5 3)2)4)
c. (+10 (-5 3)(/2 4))
d. 10 + (5-3) + 2/4
c
which of the following is a valid scheme expression?
a. 9 *(4 -2)/7
b. *9(/(- 4 2)7)
c. (* 9(/ (- 4 2)7))
d. *9 / -4 2 7
c
one of the major difference between imperative and functional programming
languages is that the functional programming languages do NOT
a. support call-by-calue parameter passing
b. allow nested function calls
, c. allow a procedure to return a value
d. have side-effects
d
the statement "a function is a first-class object" means that a function
a. must have a return value
b. must be instantiated from a class
c. can be placed in a place where a value is expected
d. may not have side effects
c
given this procedure, what is the return result?
(define (guess value)
(cond ((number? value)"I'm a number")
((char?value)"I'm a characted")
((interger?value)"I'm a integer")))
(guess 10)
a. "i'm a character"
b.error
c."I'm a integer"
c."I'm a number"
d
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller NurseAdvocate. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £8.56. You're not tied to anything after your purchase.