Quiz
Survey of Programming Languages 3
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (20)
1What does a lambda expression specify?
- AA named function that performs some behavior.
- BA variable assignment.
- CA nameless function that performs some behavior.
- DFunction composition of two unrelated functions.
2In what common data structure are LISP lists normally stored?
- AAn array.
- BA multidimensional cubic table structure.
- CA tree structure in which each node can have any amount of children
- DA linked list structure in which each node has two pointers
3Which of the following is not true regarding the original Scheme programming language mentioned in the Text Book?
- AThe Scheme language is a dialect of LISP.
- BComplex numbers are supported in Scheme.
- CScheme like LISP before it uses dynamic scoping
- DScheme requires that the scheme language processing systems convert all tail recursive functions to iterations.
4What data type(s) were parts of the original LISP?
- AAtoms and lists
- BLists and strings
- CIntegers, lists, arrays, strings
- DLists
5If a function is called tail recursive then?
- AIt contains at least one parameter.
- BThe last statement with the function returns a constant making it easier to convert to an iterative statement.
- CThe last statement within the function is a recursive call to the function itself.
- DThe function is one of two functions which together make a recursive function.
6What does the following expression in Scheme evaluate to (- 5 (* 6 3))?
- A-13
- B13
- C6
- D3
7What was the type of scoping used in the original LISP?
- ADynamic
- BStatic
- CNA, scope does not make sense in the original LISP
- DLexical
8How do Functional Programming languages handle I/O?
- AThey are a fundamental part of any programming language and cannot be avoided.
- BInput and output operations change the state a program and therefore cannot be part of any pure functional programming language.
- CTypical support should exist for I/O as it us a fundamental part of any pure functional programming language.
- DThey handle them the same way as Imperative Programming Languages do.
9The Apply-to-All Functional Form is achieved in Scheme by using the following keyword:
- Acompose
- Bmap
- CDEFINE
- DLET
10Which of the following is not a characteristic of Purely Functional Programming Language?
- AThey are designed to mimic mathematical functions.
- BThey do not use variables or assignment statements.
- CThey do not always produce the same results when executing the same function with the same parameters.
- DThey must specify repetition through recursion rather than iteration.
11When would you use a functional programming language over an imperative one?
- AWhen you want to perform a task that involves heavy use of I/O.
- BWhen the underlying problem requires a tight coupling with the architecture of the system being used.
- CWhen the nature of the underlying problem being solved is an underlying mathematical one.
- DIn an internet of things device where its main use would be to collect sensor data.
12All functional programing languages are?
- ACompiled.
- BCompiled and/or interpreted varies with the languages.
- CNeither Compiled nor Interpreted.
- DInterpreted.
13What is a higher order function?
- AA nameless function.
- BA function that can take one or more functions as parameters or returns a function as a result, or both.
- CA function that always produces the same result when given the same parameters.
- DA function that takes parameters and returns a result.
14Referential transparency refers to what?
- AThe type of scope used in functional programming languages.
- BA function should only be defined once and only once within a program
- CThe execution of a function always produces the same result when give the same parameters
- DGiven two functions it is possible to combine them through function composition to make a new function
15Which of the following is considered a functional programming language?
- AJava
- BC
- CPython
- DLISP
16What is the difference between EQV? And EQ? In Scheme?
- AEQV? tests for the equality of two atoms without knowing whether they are symbolic or numeric whereas EQ? compares the pointer values.
- BEQV? tests for floating point number equality whereas EQ? does not.
- CThere is no difference between the two
- DEQ? is used to check if a list has already been created and EQV? is used for numeric comparison only.
17Lists in Lisp are specified using:
- AParentheses
- BBrackets
- CCurly brackets
- DQuotes
18What function is available in Scheme that can be called to interpret Scheme code?
- ALET
- BDEFINE
- CEVAL
- DLAMDA
19What is a Functional Programming Language?
- AA language whose design mimics the underlying architecture of the machine by using an underlying low-level programing methodology.
- BA language that supports the concept of inherently having state of which changes throughout the execution process. This state is represented by the program s variable.
- CA language that functionally mimics the lower level processor functionality
- DA language that is designed to mimic mathematical functions to the greatest extent possible
20C#, JavaScript, Ruby and Python all provide support for this particular feature found in Functional Programming Languages:
- AVariable types and defining.
- BSupport for nameless functions
- CSupport for iteration.
- DVariable assignment statements.
Information
- Description
- Quiz on Survey of Programming Languages 3, created by Grant King on 12/10/2017.
- Author
- Grant King
- Language
- English
- Views
- 0
- Rating
- No ratings yet Rate this quiz