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




There are 5 questions to complete.

Leave a Comment