Principles of Programming Languages Mid - II, November - 2014
1.Which of the following is not a general characteristic of a sub program?
-
It has a single entry point
-
There is only one subprogram in execution at any given time
-
control always returns to the caller when the subprogram execution terminates
-
It does not separate from the main program
-
Answer: D
2.In which of the following parameter passing mechanism, the formal parameter is bound to an access method at the time of the subprogram call?
-
pass-by-value
-
pass-by-reference
-
pass-by-name
-
pass-by-result
-
Answer: C
3.In C++ data abstractions are provided by _________.
-
Objects
-
Classes
-
Interfaces
-
Modules
-
Answer: B
4._____________ is a view or representation of an entity that includes only the most significant attributes.
-
An abstraction
-
Encapsulation
-
Inheritance
-
Binding
-
Answer: A
5.___________ are convenient for encapsulating libraries of related methods and constants.
-
Objects
-
Classes
-
Interfaces
-
Modules
-
Answer: D
6.The java _________ clause of a method lists the checked exceptions that it can throw and does not handle.
-
try
-
throw
-
final
-
finally
-
Answer: B
7.In ADA exceptions are raised explicitly with the statement ________________.
-
try
-
throw
-
final
-
raise
-
Answer: D
8.Which of the following exception is not defined in the default package, Standard in ADA?
-
Constraint_Error
-
Program_Error
-
Standard_Error
-
Tasking_Error
-
Answer: C
9.Which of the following is a static scoped and strongly typed functional languages?
-
ML
-
FORTRAN
-
ADA
-
BASIC
-
Answer: A
10.Which of the following is not a core data type in python?
-
List
-
Dictionary
-
Class
-
Tuple
-
Answer: C
11.The _____________ of a subprogram is its parameter profile plus, if it is a function, its return type.
Answer: protocol
12.The parameters in the subprogram header are called _____________ parameters.
Answer: formal
13.The _________ is a special subprogram that has multiple entries and is used to provide interleaved execution of subprograms.
Answer: co-routine
14.A collection of one or more files that appears to applications programs to be a single dynamic link library or executable is ___________.
Answer: an assembly
15.Heap dynamic class objects are created with _________ operator.
Answer: new
16.___________ statement in Java facilitates defensive programming.
Answer: assert
17.In ADA ___________ is a directive to the compiler.
Answer: pragma
18.The two types of data objects in the original LIST were _________ and _________
Answer: atoms and lists
19.A higher-order function that either takes functions as parameters or yields a function as its result or both is _____________.
Answer: functional form
20.A ___________ is a file containing Python definitions and statements.
Answer: module