GATE CSE 2005

Question 1
What does the following C-statement declare?
int ( * f) (int * ) ; 
A
A function that takes an integer pointer as argument and returns an integer
B
A function that takes an integer as argument and returns an integer pointer
C
A pointer to a function that takes an integer pointer as argument and returns an integer.
D
A function that takes an integer pointer as argument and returns a function pointer
C Programming   Function
Question 2
An Abstract Data Type (ADT) is:
A
same as an abstract class
B
a data type that cannot be instantiated
C
a data type for which only the operations defined on it can be used, but none else
D
all of the above
Data Structure   
Question 3
A common property of logic programming languages and functional languages is:
A
both are procedural languages
B
both are based on \lambda-calculus
C
both are declarative
D
both use Horn-clauses
C Programming   
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
A
(i) and (ii) only
B
(i) and (iv) only
C
(i), (ii) and (iv) only
D
(i), (iii) and (iv) only
   
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?
A
An array of 50 numbers
B
An array of 100 numbers
C
An array of 500 numbers
D
A dynamically allocated array of 550 numbers
Data Structure   Array
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?
A
Graph G has no minimum spanning tree (MST)
B
Graph G has a unique MST of cost n-1
C
Graph G has multiple distinct MSTs, each of cost n-1
D
Graph G has multiple spanning trees of different costs
Algorithm   Minimum Spanning Tree
Question 7
The Asymptotic Notation of computing the transitive closure of a binary relation on a set of n elements is known to be:
A
O(n)
B
O(n log n)
C
O(n^{3/2})
D
O(n^{3})
Algorithm   Asymptotic Notation
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?
A
X=Y
B
X\subsetY
C
Y\subsetX
D
None of these
Discrete Mathematics   Set Theory
Question 9
The following is the Hasse diagram of the poset [{a,b,c,d,e}, \prec ]

The poset is:
A
not a lattice
B
a lattice but not a distributive lattice
C
a distributive lattice but not a Boolean algebra
D
a Boolean algebra
Discrete Mathematics   Lattice
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:
A
6
B
8
C
9
D
13
Discrete Mathematics   Planar Graph
There are 10 questions to complete.

Leave a Comment

Like this FREE website? Please share it among all your friends and join the campaign of FREE Education to ALL.