Professional Documents
Culture Documents
a)
6 In what ratio should water be mixed with soda costing Rs. 12 per
liter so as to make a profit of 25% by selling the diluted liquid at Rs.
13.75 per liter?
10 : 1 b) 11 : 1 c) 1 : 11 d) 12 : 1 e) 1 : 12
7 A gain percent of 20 is made by selling the mixture of two types of
ghee at Rs. 480 per kg. If the type costing 610 per kg was mixed
with 126kg of the other, how many kilograms of the former was
mixed?
a) 138kg b) 34.5kg c) 69kg d) Cannot be determined
8 879 x 37 x 8 = ?
(1) 32523 (2) 292707 (3) 260184 (4) 257224
9 The sum of squares of two numbers is 80 and the square of their
difference is 36. The product of the two numbers is 1) 2 2 2) 4 4
3) 5 8
4) 1 1 6
10Directions for Question 1 to 3: Refer to the following Bar
questions that follow:
Suppose we have the following class whose underlying data structure is a linked list of
ListNodes.
class List {
public:
// other public functions
~List();
private:
struct ListNode {
int item;
ListNode *next;
};
ListNode *head;
};
Which of the following sequences of code could be used in the destructor ~List() to correctly
delete all of the nodes in the list? (Which ones are legal, even if the style is atrocious?)
I. for (ListNode *n = head; head != NULL; head = n) {
n = head->next;
delete head;
}
II. for (ListNode *n = head; n != NULL; n->next) {
delete n;
}
III. ListNode* n;
while (head != NULL) {
n = head->next;
delete head;
head = n;
}
A I and II only
B. II and III only
C. I and III only
11.
D. III only
E. I, II, and III
Suppose you were implementing a data structure to store information about the paintings on display at an art dealers showroom.
Of the following data structures, which one is the
right one to use?
A. Unordered array B. Sorted array C. Linked list D. Binary search tree E. It depends
1-c
2-2
3-1
4-1
5-1
6-c
7-d
8-3
9-1
10
1: a
2: a
3: b
11-3
12- 3
13-1 14-2 15-2 16-1 17-C 18-B 19-c 20-2 21-2 22-1 23-2 24-1 25-4 26-c 27-3 27-2
28-5 29-a 30-b 31:1-e 31:2-c 32-a 33-4 34-2 35- b 36-d 37-b 38-d 39-a 40-b 41-c 42-a 43-a 44-a 45-a