1
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
A function f defined on stacks of integers satisfies the following properties. f(∅) = 0 and f (push (S, i)) = max (f(S), 0) + i for all stacks S and integers i. If a stack S contains the integers 2, -3, 2, -1, 2 in order from bottom to top, what is f(S)?
A
6
B
4
C
3
D
2
2
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
A program P reads in 500 integers in the range [0, 100] representing the cores of 500 students. It then print 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
3
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
In an inventory management system implemented at a trading corporation, there are several tables designed to hold all the information. Amongst these, the following two tables hold information on which items are supplied by which suppliers, and which warehouse keeps which items along with the stock-level of these items.

Supply = (supplierid, itemcode)
Inventory = (itemcode, warehouse, stocklevel)

For a specific information required by the management, following SQL query has been written

Select distinct STMP.supplierid 
From Supply as STMP 
Where not unique (Select ITMP.supplierid 
    From Inventory, Supply as ITMP 
    Where STMP.supplierid = ITMP.supplierid 
    And ITMP.itemcode = Inventory.itemcode 
    And Inventory.warehouse = 'Nagpur');
For the warehouse at Nagpur, this query will find all suppliers who
A
do not supply any item
B
supply exactly one item
C
supply one or more items
D
supply two or more items
4
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
A B-Tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then the maximum number of nodes that could be newly created in the process are:
A
5
B
4
C
3
D
2
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12