The Cobol language was developed primarily for which of the following:
3. Open Ended
30 seconds
1 pt
The C language was developed at Bell Laboratories by Dennis Ritchie during:
4. Open Ended
30 seconds
1 pt
The Fortran language was developed in 1957 by a team led by the following:
5. Open Ended
30 seconds
1 pt
Professors John G. Kemeny and Thomas E. Kurtz of Dartmouth University developed which language?
6. Open Ended
30 seconds
1 pt
Programming languages offer abstraction from the details of the computer hardware. This abstraction resulted in less programming effort but also some loss of 'detail' that could potentially result in less efficient code?
7. Open Ended
30 seconds
1 pt
True/False: Algol has influenced programming language design more than any other single programming language?
8. Open Ended
30 seconds
1 pt
True/False: The Assembler language was an early step towards abstraction that allowed programmers to use symbols for machine instructions and not binary numbers?
9. Open Ended
30 seconds
1 pt
True/False: The development of the C language is associated with the development of the Unix operating system?
10. Open Ended
30 seconds
1 pt
True/False: The benefit of the C language was that it was high level and ensured that the user had no access to the lower level capabilities of assembly language eliminating the potential for many programming bugs.
11. Open Ended
30 seconds
1 pt
Which of the following is NOT an example of an imperative programming language?
12. Open Ended
30 seconds
1 pt
Which of the following is NOT a component of the von Neuman architecture?
13. Open Ended
30 seconds
1 pt
What feature of the von Neumann architecture was unique at the time and is an element of virtually every modern computer today?
14. Open Ended
30 seconds
1 pt
True/False: In a Turing machine the only operations that are possible on the ribbon are the read and write of one bit.
15. Open Ended
30 seconds
1 pt
True/False: The Turing-Church Thesis states that any computing problem that cannot be solved with a Turning machine can be solved with Lambda Calculus.
16. Open Ended
30 seconds
1 pt
True/False: The model of computing introduced by Alonzo Church was known as the Church Thesis.
17. Open Ended
30 seconds
1 pt
True/False: A computer architecture that stores program instructions on an external device such as a tape or drum and not in memory is consistent with the von Neumann architecture?
18. Open Ended
30 seconds
1 pt
True/False: In the von Neumann architecture, the bus describes the connections between the components in the architecture that is used to move data between them.
19. Open Ended
30 seconds
1 pt
True/False: A bus with less bits has an advantage because it operates faster and can move more data.
20. Open Ended
30 seconds
1 pt
True/False: Turing's concept of the turing machine was based upon the concepts and rules of mathematical functions.
21. Open Ended
30 seconds
1 pt
True/False: The revolutionary innovation that von Neumann introduced in his computer architecture was the use of registers within the Arithmetic Logic Unit.
22. Open Ended
30 seconds
1 pt
Which of the following is a characteristic of a non-imperative programming language.
23. Open Ended
30 seconds
1 pt
Which of the following is NOT a feature or characteristic of imperative programming languages.
24. Open Ended
30 seconds
1 pt
True/False: One of the features of imperative programming languages is that the programmer specifies results and input but lets the compiler determine the computation steps necessary to solve the computing problem.
25. Open Ended
30 seconds
1 pt
True/False: Java is an example of a functional programming language.
26. Open Ended
30 seconds
1 pt
True/False: non-imperative languages are referentially transparent which means that a particular state is not required for successful and consistent computation.
27. Open Ended
30 seconds
1 pt
True/False: In imperative programming languages assignment is the core operation that is performed.
28. Open Ended
30 seconds
1 pt
Which of the following is an example of a imperative programming language.
29. Open Ended
30 seconds
1 pt
The extensions to BNF were designed to provide a shorthand to simplify the grammar. The * symbol was one such extension used in EBNF and indicated:
30. Open Ended
30 seconds
1 pt
In the following example EBNF grammar, what does the symbol
describe?
:= '-'? + ('.' +)? := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
31. Open Ended
30 seconds
1 pt
The step in the compilation process where EBNF or BNF are used to determine if the structure of programming language statements are valid is called.
32. Open Ended
30 seconds
1 pt
Consider the following grammar, which of the following is a terminal
statement: whileStatement | ifStatement | '{' statementSequence '}'
whileStatement: 'while' '(' expression ')' statement
ifStatement: 'if' '(' expression ')' statement
statementSequence: | statement ';' statementSequence
expression:
33. Open Ended
30 seconds
1 pt
Consider the following grammar, which of the following is a non-terminal symbol?
statement: whileStatement | ifStatement | '{' statementSequence '}'
whileStatement: 'while' '(' expression ')' statement
ifStatement: 'if' '(' expression ')' statement
statementSequence: | statement ';' statementSequence
expression:
34. Open Ended
30 seconds
1 pt
True/False: In syntactical analysis the bottom-up parsing approach is referred to LL analysis?
35. Open Ended
30 seconds
1 pt
True/False: The EBNF (or Extended BNF) approach to grammar specification was a rewrite of the original BNF developed by John Backus designed to 'normalize' grammar specification?
36. Open Ended
30 seconds
1 pt
In the following BNF example, the symboil is considered to be a terminal symbol?
:= := 'John' | ' Mary'
:= 'eats' | 'talks'
37. Open Ended
30 seconds
1 pt
True/False: According to EBNF the | character means 'or'.
38. Open Ended
30 seconds
1 pt
True/False: Lexical analysis is the step in the compilation process where tokens are extracted from the programming language statements.
39. Open Ended
30 seconds
1 pt
True/False: In syntactical analysis the top-down parsing approach is referred to LL analysis?
40. Open Ended
30 seconds
1 pt
The term compiler was coined in the 1950's by which of the following?
41. Open Ended
30 seconds
1 pt
Which of the following is NOT one of the steps or 'phases' of the compilation process.
42. Open Ended
30 seconds
1 pt
The lexical analysis phase of the compilation process is also known as:
43. Open Ended
30 seconds
1 pt
Which of the following expressions can be evaluated as syntactically correct by the following grammar?
E = N | E "+" E.
N = "1" | "2" | "3" | "4" .
44. Open Ended
30 seconds
1 pt
Which of the following is NOT a function supported by debuggers?
45. Open Ended
30 seconds
1 pt
True/False: Real time, every time is a way of describing the role of a compiler as opposed to an interpreter.
46. Open Ended
30 seconds
1 pt
True/False: The front end of a compiler is language-dependent and the back-end is computer dependent.
47. Open Ended
30 seconds
1 pt
True/False: A compiler is a program that translates one language to another.
48. Open Ended
30 seconds
1 pt
True/False: Assembler Language was developed before Machine Language.
49. Open Ended
30 seconds
1 pt
True/False: The loader compiles a program and performs type checking on it.
50. Open Ended
30 seconds
1 pt
Which of the following programming languages is an example of a programming language with strong type checking.
51. Open Ended
30 seconds
1 pt
Which of the following is an example of a dynamic typed programming language?
52. Open Ended
30 seconds
1 pt
Which of the following is NOT an example of a dynamic typed programming language?
53. Open Ended
30 seconds
1 pt
True/False: Perl is an example of a static typed programming language.
54. Open Ended
30 seconds
1 pt
True/False: An advantage to a weak typed programming language is that it eliminates type issues that can cause hard to find bugs in a program.
55. Open Ended
30 seconds
1 pt
True/False: Type checking is a part of the compilation process that occurs in step 2 syntax analysis.
56. Open Ended
30 seconds
1 pt
True/False: Type checking will validate, strongly typed programming languages, that the type of an expression is consistent with the type of a target variable.
57. Open Ended
30 seconds
1 pt
True/False: In imperative programming languages, the assignment statement is the only statement that does anything.
58. Open Ended
30 seconds
1 pt
True/False: in Perl, the pragma 'strict' simulates static typing.
59. Open Ended
30 seconds
1 pt
True/False: In a dynamic typed language the programmer is not required to declare and initialize variable before its use.
60. Open Ended
30 seconds
1 pt
Which of the following best describes a Type 1 hypervisor.
61. Open Ended
30 seconds
1 pt
True/False: The IBM model of virtualization evolved from mainframe technology and was based upon the mapping of instructions from the virtual machine to physical machine.
62. Open Ended
30 seconds
1 pt
True/False: The java compiler generates machine instructions for the target computing using a compiler program known as the JRE.
63. Open Ended
30 seconds
1 pt
True/False: The design of the Java Virtual Machine is primarily intended to enhance the portability of Java applications.
64. Open Ended
30 seconds
1 pt
True/False: Java's unique design has achieved 100% portability.
65. Open Ended
30 seconds
1 pt
True/False: The Unix virtual machine model implements virtualization through the use of process shells.
66. Open Ended
30 seconds
1 pt
True/False: The type 2 hypervisor is designed to run directly on bare metal.
67. Open Ended
30 seconds
1 pt
Which option is the 2's complement of the following binary number:
00011100
68. Open Ended
30 seconds
1 pt
Which of the following image file formats was developed using a Little-Endian format?
69. Open Ended
30 seconds
1 pt
Convert -32 into a 2's complement binary number:
70. Open Ended
30 seconds
1 pt
What is the binary equivalent of decimal 25 in 2's complement?
71. Open Ended
30 seconds
1 pt
Which of the following computer systems used a Little-Endian architecture.
72. Open Ended
30 seconds
1 pt
True/False: A negative number is represented in 2's complement by a leading 0 bit followed by the binary representation of the value.
73. Open Ended
30 seconds
1 pt
True/False: The following operation in binary will generate the 2's complement binary equivalent of 128?
01111111 + 00000001
74. Open Ended
30 seconds
1 pt
True/False: They key limitation of ASCII was that it could only represent 255 characters ?
75. Open Ended
30 seconds
1 pt
True/False: The high order byte refers to a byte with a value greater than 256.
76. Open Ended
30 seconds
1 pt
True/False: Big Endian architectures store the most significant byte first (which is the lowest memory address in the range) in memory.
77. Open Ended
30 seconds
1 pt
Which of the following is NOT an elementary data type.
78. Open Ended
30 seconds
1 pt
A variable of type byte will have what number of bits?
79. Open Ended
30 seconds
1 pt
True/False: Integer numbers include the set of all positive whole numbers and zero.
80. Open Ended
30 seconds
1 pt
True/False: The type char is always 8 bits in length.
81. Open Ended
30 seconds
1 pt
True/False: An advantage to using an unsigned integer is that a larger positive number can be stored than can be stored with a signed integer.
82. Open Ended
30 seconds
1 pt
True/False: An enumeration data type is an abstraction mechanism that allows labels such on/off or high, medium, and low to be associated with simple data types.
83. Open Ended
30 seconds
1 pt
True/False: All imperative programming languages support enumeration data types.
84. Open Ended
30 seconds
1 pt
True/False: In 'C', the char is essentially a small integer and supports the ability to readily convert between char and integer.
85. Open Ended
30 seconds
1 pt
True/False: In many programming languages such as Java and 'C' the evaluation of an expression that employs operators such as greater than, less than, and, or and not (employing the proper syntax) returns a type of boolean.
86. Open Ended
30 seconds
1 pt
True/False: A variable of type long will require 16 bits of memory.
87. Open Ended
30 seconds
1 pt
The RECORD type is implemented in different ways in programming languages. Which option best describes the record implementation in 'C'.
88. Open Ended
30 seconds
1 pt
Specific data elements in an array are accessed using an:
89. Open Ended
30 seconds
1 pt
True/False: An array is comprised of a collection of elementary data types which can all be of different types.
90. Open Ended
30 seconds
1 pt
True/False: An advantage of the array is that is ensures that all values are always in sorted order.
91. Open Ended
30 seconds
1 pt
True/False: The string type is essentially implemented as an array of characters.
92. Open Ended
30 seconds
1 pt
True/False: Arrays are flexible data structures as the length of the array can be dynamically changed at any time.
93. Open Ended
30 seconds
1 pt
True/False: Arrays are limited to having either one or two dimensions.
94. Open Ended
30 seconds
1 pt
The following are expressed in what format: 123.
45x10^3 1.2345x10^-8 0.00012345x10^7 12345000.0x10^4
95. Open Ended
30 seconds
1 pt
Which of the following is NOT a component required to express a floating point number in binary using scientific notation.
96. Open Ended
30 seconds
1 pt
True/False: The advantage of fixed-point numbers is that the accuracy, that is the absolute error, is variable.
97. Open Ended
30 seconds
1 pt
True/False: Decimal numbers represented directly by assigning four bits to each decimal is callled binary-coded decimal (BCD).
98. Fill in the Blank
30 seconds
1 pt
Dynamic binding occurs _______: Select the one best answer.
99. Open Ended
30 seconds
1 pt
Which of the following cannot be dynamically bound:
100. Open Ended
30 seconds
1 pt
Which of the following is NOT one of the attributes of a variable.
101. Open Ended
30 seconds
1 pt
True/False: binding refers only to variables. The association of a function name or the output of an expression is not a binding.
102. Open Ended
30 seconds
1 pt
True/False: The statement x+=1; below is binding the variable x.
int x;
x=1;
x+=1;
103. Open Ended
30 seconds
1 pt
True/False: Early binding supports compilation, late binding supports interpreters.
104. Open Ended
30 seconds
1 pt
True/False: Statically bound variables can be used as arguments in recursive functions.
105. Open Ended
30 seconds
1 pt
True/False: The r-value refers to the location or reference.
106. Open Ended
30 seconds
1 pt
True/False: The Scope of a variable refers to the domain where a specific binding refers to the same location in memory.
107. Open Ended
30 seconds
1 pt
A programming language developed in the 1950's for business data processing.
108. Open Ended
30 seconds
1 pt
Using your knowledge of binding, lifetime, and scope rules, determine what the following code will produce as output ... assume that the code in in the Java language:
public class test {
public static void main(String[] args) {
int x,y;
x=1;
y=my_int(x);
System.out.println(x);
}
static int my_int(x) {
x = 5;
return(x+x);
}
}
109. Open Ended
30 seconds
1 pt
Select the only best answer. The function of the symbolic assembler is to.
110. Open Ended
30 seconds
1 pt
True/False: The stored-program computer architecture was a significant innovation by storing the program and data in memory.
111. Open Ended
30 seconds
1 pt
A program that translates or implements a computation specified in an abstract form into the detailed form needed for execution on a computer is called a:
112. Open Ended
30 seconds
1 pt
The most famous descendent of Algo is ____ which was developed in the 1960's by Niklaus Wirth.
113. Open Ended
30 seconds
1 pt
Which of the following is NOT a programming structure?
114. Open Ended
30 seconds
1 pt
Given that n and count are both of type int, which statement is true about the following code segments?
I for (count=1; count <= n; count++)
System.out.println(count);
II count = 1;
while (count <= n)
{
System.out.println(count);
count++;
}
115. Open Ended
30 seconds
1 pt
Consider the following code segment:
for (int k=0; k<20; k=k+2)
{
if (k%3 == 1)
System.out.print(k+" ");
}
What is printed when this code is executed?
116. Open Ended
30 seconds
1 pt
What will the output of the following code be?
c=1;
switch (c) {
case 1:
print '1';
case 2:
print '2';
break;
case 3:
print '3';
break;
}
117. Open Ended
30 seconds
1 pt
Consider the following code segment
if (n != 0 && n / n > 1000)
statement1;
else
statement2;
if n is of type int and has a value of 0 when the segment is executed, what will happen?
118. Open Ended
30 seconds
1 pt
What will the output be for the following poorly formatted program segment, if the input value for num is 22?
int num = call to a method that reads an integer;
if(num>0)
if(num%5 ==0)
System.out.println(num);
else System.out.println(num+" is negative");
119. Open Ended
30 seconds
1 pt
The output of compilation is code generation which typically translates a language construct into assembly language and from there into machine executable code. What language construct was the following segment of assembler code generated from?
compute R1,expression
jump.eq R1,L1
statement-1
jump L2
L1: statement-2
L2:
120. Open Ended
30 seconds
1 pt
The correct looping statement to use when the number of iterations is known is:
121. Open Ended
30 seconds
1 pt
The ___ statement implements a pre-test loop that is used when the number of iterations is NOT known.
122. Open Ended
30 seconds
1 pt
True/False: The switch/case statement is an example of the sequence structure implemented within a programming language?
123. Open Ended
30 seconds
1 pt
True/False: Loop statements are the most difficult statements to program.
124. Open Ended
30 seconds
1 pt
What type of programming approach represents the combination of imperative programming with subprograms?
125. Open Ended
30 seconds
1 pt
Which of the following is NOT a component of a subprogram?
126. Open Ended
30 seconds
1 pt
In the following code segment, the variable A is a:
int B=1;
int Z;
Z = myfunc(B);
int myFunc( int A ) {
return (A+1);
}
127. Open Ended
30 seconds
1 pt
In the following code segment, the variable B is a:
int B=1;
int Z;
Z = myfunc(B);
int myFunc( int A ) {
return (A+1);
}
128. Open Ended
30 seconds
1 pt
True/False: For complex computations functions may be specified to return multiple values.
129. Open Ended
30 seconds
1 pt
True/False: The real disadvantage of call-by-reference is that the mechanism is inherently unsafe.
130. Open Ended
30 seconds
1 pt
True/False: a subprogram is an object within a program that can be invoked from elsewhere within the program.
131. Open Ended
30 seconds
1 pt
True/False: Subprograms that return a value are called procedures.
132. Open Ended
30 seconds
1 pt
True/False: The semantics of a procedure call are as follows: the current sequence of instructions are executed in parallel; the sequence of instructions within the procedure body is executed; upon completing the procedure body, the procedure is garbage collected.
133. Open Ended
30 seconds
1 pt
True/False: Actual parameters can only be specified as variables
134. Open Ended
30 seconds
1 pt
True/False: The semantics in which the address of a variable is bound to the name of the formal parameter variable is known as copy-in semantics or call-by-value.
135. Open Ended
30 seconds
1 pt
Which of the following is NOT cloned when a recursive call is made?
136. Open Ended
30 seconds
1 pt
The following code segment is an example of:
void f() {
... f() ...
}
137. Open Ended
30 seconds
1 pt
The following code segment is an example of:
void f() {
... g() ...
}
void g() {
... f() ...
}
138. Open Ended
30 seconds
1 pt
In the following code segment, the statement if (k < 0) return; is called the what?
void badPrint2( int k ) {
if (k < 0) return;
System.out.println(k);
badPrint2( k+1 );
}
139. Open Ended
30 seconds
1 pt
True/False: Using recursion always makes your code faster.
140. Open Ended
30 seconds
1 pt
True/False: An algorithm can often be implemented with either recursion or iteration, however iteration typically takes less memory.
141. Open Ended
30 seconds
1 pt
True/False: An algorithm can often be implemented with either recursion or iteration, however recursion is typically faster.
142. Open Ended
30 seconds
1 pt
Which of the following is NOT an example of a system programming language?
143. Open Ended
30 seconds
1 pt
Which of the following is NOT an example of a scripting language?
144. Open Ended
30 seconds
1 pt
Which of the following is NOT an example of a markup language?
145. Fill in the Blank
30 seconds
1 pt
The Tool Command Language with the widget Toolkit (Tcl/Tk) was developed by ______.
146. Fill in the Blank
30 seconds
1 pt
The Python language was developed by _____ in 1991 while he was working for the research institute CWI in the Netherlands
147. Fill in the Blank
30 seconds
1 pt
In scripting languages, memory management is done by a _______ and not by the programmer
148. Open Ended
30 seconds
1 pt
True/False: Perl was originally developed by Linus Trovalds as a scripting language for Windows.
149. Open Ended
30 seconds
1 pt
True/False: Most scripting languages are interpreted.
150. Open Ended
30 seconds
1 pt
True/False: Python is an older language than either Tcl/Tk and Perl.
151. Open Ended
30 seconds
1 pt
True/False: Python is a programming language that has the diverse characteristics of being interpreted, byte-compiled, interactive, and object-oriented.
152. Open Ended
30 seconds
1 pt
The following segment of code in Perl produces the ouput 2. This indicates that Perl is:
print 1+"1"
153. Open Ended
30 seconds
1 pt
The following segment of code in Python will produce an error. This indicates that Python tends to be more:
print 1+"1"
154. Open Ended
30 seconds
1 pt
What elements will the Perl language @a array consist of?
$_ = ' a b c ';
my @a = split();
155. Open Ended
30 seconds
1 pt
What output will the following segment of Perl code produce?
my @a = (0, 1, 2);
my $b = @a;
print $b;
156. Open Ended
30 seconds
1 pt
In Perl, to test if the variable $str contains the word "abc" you would use:
157. Open Ended
30 seconds
1 pt
In Perl, given the following code, the statement if($var) will evaluate to:
$var = "False"
158. Open Ended
30 seconds
1 pt
In Perl, a scalar variable can hold:
159. Open Ended
30 seconds
1 pt
When Perl evaluates $expr = 1 + 2 * 3 - 4 the value of $expr will contain:
160. Open Ended
30 seconds
1 pt
True/False: JavaScript was derived from the Java language.
161. Open Ended
30 seconds
1 pt
True/False: The following segment of JavaScript code is valid.
if (how == "reverse")
{
parent.page1.location.href="page2.html"
}
else
{
parent.page2.location.href="page2.html"
}
162. Open Ended
30 seconds
1 pt
True/False: The following code segment represents a valid declaration of a variable in JavaScript.
var KeepVar;
163. Open Ended
30 seconds
1 pt
Assuming the source text below, what will the following regular expression (in red) match to?
..stage
Source Text:
All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts...
164. Open Ended
30 seconds
1 pt
Assuming the source text below, what will the following regular expression (in red) match to?
[ ]\w{7,7}[.]
Source Text:
All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts...
165. Open Ended
30 seconds
1 pt
The expression {4,8} will match:
166. Open Ended
30 seconds
1 pt
Which of the following regex expressions would match the following: MyDogIs12
167. Open Ended
30 seconds
1 pt
What will the following regular expresssion match to?
([\w]+[-._+&])*[\w]+@([-\w]+[.])+[a-zA-Z]{2,6}
168. Open Ended
30 seconds
1 pt
True/False: The basic regular expression is pattern matching?
169. Open Ended
30 seconds
1 pt
Real world objects contain what two things?
170. Open Ended
30 seconds
1 pt
The class that inherits attributes and behaviors from the base class is called the:
171. Open Ended
30 seconds
1 pt
The unit of encapsulation and abstraction in object oriented programming that defines data types and subprogram declarations is called a?
172. Open Ended
30 seconds
1 pt
The abstraction of data and the implementation of behaviors in object oriented programming is known as:
173. Open Ended
30 seconds
1 pt
A programming language is said to support object oriented programming if it includes all of the following constructs EXCEPT:
174. Fill in the Blank
30 seconds
1 pt
A software object's behavior is exposed through its ______?
175. Fill in the Blank
30 seconds
1 pt
When an object is created from a class, we refer to it as an ________ of the class?
176. Open Ended
30 seconds
1 pt
The ability to select the appropriate subprogram at run-time based upon an evaluation of types is known as? (NOTE: there are 4 possible answers and you can specify any of the 4).
177. Open Ended
30 seconds
1 pt
True/False: In dynamic polymorphism, the appropriate type / method is selected during the compile process.
178. Open Ended
30 seconds
1 pt
True/False: The ability of the compiler to select, at compile time, the most appropriate data type or method to use based upon data type is known as dynamic polymorphism?
179. Open Ended
30 seconds
1 pt
True/False: A superclass contains all of the attributes and behaviors of its subclasses.
180. Open Ended
30 seconds
1 pt
Which of the following is NOT an advantage of Generics?
181. Open Ended
30 seconds
1 pt
True/False: The main purpose of an abstract class is to be inherited by other classes.
182. Open Ended
30 seconds
1 pt
True/False: In Java, the programmer is responsible for initiating the garbage collection process when an object has been de-referenced.
183. Open Ended
30 seconds
1 pt
True/False: A derived class is limited to the characteristics and behaviors inherited from the base class.
184. Open Ended
30 seconds
1 pt
True/False: In object oriented programming languages such as Java, polymorphism refers to the ability of a class to have more than one method of the same name where the appropriate method is invoked based upon the number and type of arguments and/or the return type.
185. Open Ended
30 seconds
1 pt
True/False: An object can inherit data members and functions from one or more based classes.
186. Open Ended
30 seconds
1 pt
True/False: The object of a derived class can perform all the tasks that an object of base class can perform.
187. Open Ended
30 seconds
1 pt
True/False: The Instantiation of an object uses memory that was pre-allocated for the program.
188. Open Ended
30 seconds
1 pt
True/False: Garbage collection is the process of 'deconstructing' objects to release the memory back to the system.
189. Open Ended
30 seconds
1 pt
When the proper method is selected during run-time and executed, this represents an example of:
190. Open Ended
30 seconds
1 pt
What type of command repeatedly executes the program body (or a block) to determine when execution should stop?
191. Open Ended
30 seconds
1 pt
In programming languages, which category must make the appropriate decision at run-time between two or more statements or expressions that occur within a program?
192. Open Ended
30 seconds
1 pt
The following fragment intends that a user will enter a list of positive integers at the keyboard and terminate the list with a sentinel:
int value = 0;
final int SENTINEL = -999;
while(value != SENTINEL)
{
// code to process value
value = IO.readInt();
}
193. Open Ended
30 seconds
1 pt
What command is used to distinguish the imperative programming languages from other programming languages?
194. Open Ended
30 seconds
1 pt
Which of the following is NOT a programming structure?
195. Open Ended
30 seconds
1 pt
In programming languages, which category uses repetition to solve a problem?
196. Open Ended
30 seconds
1 pt
What is used to execute Java bytecode?
197. Open Ended
30 seconds
1 pt
What values are stored in x and y after execution of the following program segment?
int x=-30, y=40;
if (x >=0)
{
if (x<=100)
{
y=x*3;
if (y<50)
x/= 10;
} else
y = x * 2;
} else
y = -x;
198. Open Ended
30 seconds
1 pt
The output of the following Haskell code will be which of the following options when fac is called with an argument of 5.
fac :: Integer -> Integer
fac n | n == 0 = 0
fac n | n > 0 = n+fac(n-1)
199. Open Ended
30 seconds
1 pt
In a functional programming language such as Haskell or Standard ML select the most accurate statement from the following list of statements.
200. Open Ended
30 seconds
1 pt
What can we say about the following Haskell function definition:
reverse :: [a] -> [a]
reverse x | x==0 = 0
| x>0 = reverse[x-1]
Please select the best answer.
201. Open Ended
30 seconds
1 pt
The following code is an example of what functional programming language concept:
(f(x)+f(x))-f(x) is equivalent to 2(f(x))-f(x)
202. Open Ended
30 seconds
1 pt
Recursion is important in functional programming. Recursion implements the idea of divide and conquer where a problem is divided into smaller problems until the smallest possible case is found. This smallest case is called the
203. Open Ended
30 seconds
1 pt
The symbol [ ] in a functional programming language such as Haskell stands for the
204. Open Ended
30 seconds
1 pt
True/False: Functional Programming Languages were designed to mimic mathematical functions.
205. Open Ended
30 seconds
1 pt
True/False: The management of variables is a constant concern and source of complexity for functionality programming languages.
206. Open Ended
30 seconds
1 pt
True/False: A tuple in functional programing is any pair of items passed into a function.
207. Open Ended
30 seconds
1 pt
True/False: The advantage of lists in functional programming languages is that they can be used to pass in any number of data items with multiple data types.
208. Open Ended
30 seconds
1 pt
The functional programming technique that optimizes away recursive calls such that only a single run-time stack frame is required is called.
209. Open Ended
30 seconds
1 pt
The map function in a functional programming language such as Haskell will:
210. Open Ended
30 seconds
1 pt
True/False: The ability to 'share' replicated expressions to avoid needless computations is known as eagar evaluation.
211. Open Ended
30 seconds
1 pt
True / False: A function that treats another function as a variable is known as a higher order function.
212. Open Ended
30 seconds
1 pt
True / False: A curried function is a function that takes in and applies its arguments one at a time.
213. Open Ended
30 seconds
1 pt
In Haskell, the following code demonstrates what feature of functional programming:
(max 4) 5
214. Open Ended
30 seconds
1 pt
In the following code, what are the contents of the argument?
boomBangs [7..13]
215. Open Ended
30 seconds
1 pt
Is the following Haskell code valid? Select the most accurate response.
circumference :: [a] -> [a]
circumference r = 2 * pi * r
216. Open Ended
30 seconds
1 pt
In the following code, what data type is the function returning?
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
let smallerSorted = quicksort (filter (<=x) xs)
biggerSorted = quicksort (filter (>x) xs)
in smallerSorted ++ [x] ++ biggerSorted
217. Open Ended
30 seconds
1 pt
In functional programming, a higher order function is a function that returns a
218. Open Ended
30 seconds
1 pt
Which of the following is NOT a valid prolog atom?
219. Open Ended
30 seconds
1 pt
Which of the following is NOT a valid variable in Prolog.
220. Open Ended
30 seconds
1 pt
What would the output of the following Prolog query be?
?- f(a,b) = f(Y,X).
221. Open Ended
30 seconds
1 pt
What relationship does the following Prolog program represent.
r(X, Y) :-
parent(Z,X).
parent(Z,Y).
male(X).
X \= Y.
222. Open Ended
30 seconds
1 pt
Select the best response that describes how Prolog will evaluate the following Prolog expression.
3 = 2+1
223. Fill in the Blank
30 seconds
1 pt
In Prolog an expression of the following format is known as a ________.
H ←B1, B2,..., Bn
224. Open Ended
30 seconds
1 pt
Assume that the following Prolog program has been consulted.
a(B,B).
Determine the output of the following query and enter in the answer blank.
?- a(1,X), a(X,Y), (Y,Z), a(Z,100).
225. Fill in the Blank
30 seconds
1 pt
In the following segment of Prolog code, 'father' is called the_____
father(jim, mary).
226. Open Ended
30 seconds
1 pt
All of the following represent which Prolog data type?
elephant
b
aX
'Hello'
227. Open Ended
30 seconds
1 pt
Given the following Prolog program:
member(X, [X|Xs]).
member(X, [Y|Ys]) :- member(X, Ys).
How will Prolog evaluate the following query?
?- member(X, [b,c,a,d]).
228. Open Ended
30 seconds
1 pt
Given the following Prolog program:
member(X, [X|Xs]).
member(X, [Y|Ys]) :- member(X, Ys).
How will Prolog evaluate the following query?
?- member(a, [b,c,a,d]).
229. Open Ended
30 seconds
1 pt
In Prolog the [ ] represents the___
230. Fill in the Blank
30 seconds
1 pt
In Prolog the following statement is called a_____
rainy(asheville).
231. Open Ended
30 seconds
1 pt
True/False: The following expression in Prolog is valid.
?- loves(mary,john) = loves(John,Mary).
232. Open Ended
30 seconds
1 pt
True/False The following prolog statement is Unifiable?
?- likes(Person, Food) = likes(sam, Food).
233. Open Ended
30 seconds
1 pt
True/False: In Prolog the term Resolution describes the process of evaluating all of the elements of an expression to determine if the entire expression evaluate to true or false.
234. Open Ended
30 seconds
1 pt
True/False: The scope of a binding is the part of the program (textually) in which the binding is active.
235. Fill in the Blank
30 seconds
1 pt
A software object's behavior is exposed through its _______?