Question 1 |
What does the following C-statement declare?
int ( * f) (int * ) ;
A function that takes an integer pointer as argument and returns an integer | |
A function that takes an integer as argument and returns an integer pointer | |
A pointer to a function that takes an integer pointer as argument and returns an integer. | |
A function that takes an integer pointer as argument and returns a function pointer |
Question 1 Explanation:
Question 2 |
An Abstract Data Type (ADT) is:
same as an abstract class | |
a data type that cannot be instantiated | |
a data type for which only the operations defined on it can be used, but none else | |
all of the above |
Question 2 Explanation:
Question 3 |
A common property of logic programming languages and functional languages is:
both are procedural languages | |
both are based on \lambda-calculus | |
both are declarative | |
both use Horn-clauses |
Question 3 Explanation:
Question 4 |
Which one of the following are essential features of an object-oriented programming language?
(i) Abstraction and encapsulation
(ii) Strictly-typedness
(iii) Type-safe property coupled with sub-type rule
(iv) Polymorphism in the presence of inheritance
(i) Abstraction and encapsulation
(ii) Strictly-typedness
(iii) Type-safe property coupled with sub-type rule
(iv) Polymorphism in the presence of inheritance
(i) and (ii) only | |
(i) and (iv) only | |
(i), (ii) and (iv) only | |
(i), (iii) and (iv) only |
Question 4 Explanation:
Question 5 |
A program P reads in 500 integers in the range [0,100] representing the scores of 500 students. It then prints the frequency of each score above 50. What would be the best way for P to store the frequencies?
An array of 50 numbers | |
An array of 100 numbers | |
An array of 500 numbers | |
A dynamically allocated array of 550 numbers |
Question 5 Explanation:
There are 5 questions to complete.