CSE240 EXAM EXAM QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS VERIFIED
6 views 0 purchase
Module
CSE240
Institution
CSE240
CSE240 EXAM EXAM QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS VERIFIED
Functional programming languages do not allow us to define
variable whose value can be modified.
the statement "a function is a first-class object" means that a function
can be placed in a place where a value is expected....
cse240 exam exam questions and answers with comple
Written for
CSE240
All documents for this subject (20)
Seller
Follow
NurseAdvocate
Reviews received
Content preview
CSE240 EXAM EXAM QUESTIONS AND ANSWERS WITH
COMPLETE SOLUTIONS VERIFIED
Functional programming languages do not allow us to define
variable whose value can be modified.
the statement "a function is a first-class object" means that a function
can be placed in a place where a value is expected.
what notation requires parentheses in order to correctly define the order of
computation?
infix notation
one of the major differences between the imperative and functional programming
languages is that the functional programming languages do not (in general)
have side-effects
convert the following expression into prefix-p notation (a Scheme statement): -5 *
(2 + 1/2) + 40
(+(*(-5)(+2(/ 1 2)))40)
in Scheme, the form (symbol-length? 'James) will return
an error message
which of the following is a valid scheme expression?
(*9(/ (-4 2) 7))
what data structure is used in scheme for representing extremely large integers?
probably a list. Really: we shouldnt know or care
, which of the following expressions will return false?
(number? #\7)
a student wondering if scheme is a strong or weakly typed language. How might
they check this?
They could execute a form like (+ #\a 10) in the REPL. if it works (like in C), then it
probably is weakly typed.
functional programming language is more friendly to parallel computing, because
it supports
side-effect free code.
which of the following are typical advantages of using a REPL for software
development?
They let you experiment with small pieces of code to understand how they work.
they let you interact with a program after is has populated the environment to
understand what is happening.
the scheme form (char? #\5) will return
true (#t)
what statements contain non-functional features of scheme? select all that apply.
(begin (write x) x)
(display x)
what functional feature does the code belwo best exhibit?
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 £7.75. You're not tied to anything after your purchase.