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:

Question 6 |

An undirected graph G has n nodes. Its adjacency matrix is given by an nxn square matrix whose

(i) diagonal elements are 0's and

(ii) non-diagonal elements are 1's.

which one of the following is TRUE?

(i) diagonal elements are 0's and

(ii) non-diagonal elements are 1's.

which one of the following is TRUE?

Graph G has no minimum spanning tree (MST) | |

Graph G has a unique MST of cost n-1 | |

Graph G has multiple distinct MSTs, each of cost n-1 | |

Graph G has multiple spanning trees of different costs |

Question 6 Explanation:

Question 7 |

The Asymptotic Notation of computing the transitive closure of a binary relation on a set of n elements is known to be:

O(n) | |

O(n log n) | |

O(n^{3/2}) | |

O(n^{3}) |

Question 7 Explanation:

Question 8 |

Let A, B and C be non-empty sets and let

X = (A - B) - C and Y = (A - C) - (B - C)

Which one of the following is TRUE?

X = (A - B) - C and Y = (A - C) - (B - C)

Which one of the following is TRUE?

X=Y | |

X\subsetY | |

Y\subsetX | |

None of these |

Question 8 Explanation:

Question 9 |

The following is the Hasse diagram of the poset [{a,b,c,d,e}, \prec ]

The poset is:

The poset is:

not a lattice | |

a lattice but not a distributive lattice | |

a distributive lattice but not a Boolean algebra | |

a Boolean algebra |

Question 9 Explanation:

Question 10 |

Let G be a simple connected planar graph with 13 vertices and 19 edges. Then, the number of faces in the planar embedding of the graph is:

6 | |

8 | |

9 | |

13 |

Question 10 Explanation:

There are 10 questions to complete.