This is given in recent exam in TCS IGNITE, Please go through it and solve. Please comment your answer here, so the others could get it also.
What is the value of x after the following code fragment is executed?
a = 10, b = 9, c = 3
if (c divides a) {
if (b > c) {
x = 1
} else {
x = 2
}
} else {
if (c divides b) {
x = 3
} else {
x = 4
} }
- 4
- 3
- 1
- 2
Points A and B move with uniform speed along straight lines that intersect at right angles at point O. When A is at O, B is 300m from O. After 5 minutes they are equidistant from O. After 4 more minutes, they are again equidistant from O. Then the ratio of A’s speed to B’s speed is
- 4:19
- 5:9
- 4:9
- 9:5
- 4:14
On planet korba, a solar blast has melted the ice caps on its equator. 9 years after the ice melts, tiny plantoids called ameeba start growing on the rocks. ameeba grows in the form of a circle and the relationship between the diameter of this circle and the age of ameeba is given by the formula d = 5 * √ (t – 9) for t ≥ 9 where d represents the diameter in mm and t the number of years since the solar blast. Jagan recorded the radius of some ameeba at a particular spot as 9mm. How many years back did the solar blast occur?
- 20
- 12.24
- 12.96
- 21.96
You have 94m of lumber and want to make a border around your swimming pool. You contemplate the following shapes for the pool. Which of these shapes can be enclosed by 94m of lumber?
In the figures below X= 31m, Y = 16m and all angles except those in the parallelogram are right angled.
- A and B
- A only
- B and D
- A and C
A chocolate drink is 11% pure chocolate by volume. If 13 litres of pure milk are added to 29 litres of this drink, the percent of chocolate in the new drink is approximately
- 7.6
- 11
- 72.52
- 37.93
If p, q, r and s are nonzero numbers such that p and q are the roots of the quadratic x2 + rx + s = 0 and r and s are the roots of the quadratic x2 + px + q = 0, then p + q + r + s =
- 2
- -2
- 0
- 4
- (-1 + √5)/2
If 9 points X1, X2, …, X9 are chosen on a straight line in that order (but not necessarily evenly spaced), and Y is an arbitrary point on the line and S is the sum of the distances YX1, YX2, …, YX9, then S is minimized when the point Y is
- midway between X2 and X8
- at X9
- at X5
- midway between X4 and X6
- midway between X1 and X9
If all desks are wooden objects and some furniture are desks, which of the following statements must be true?
I. All desks are furniture.
II. Some wooden objects are furniture.
III. Some desks are not furniture
- None of them are true
- I only
- III only
- II and III only
- II only
Cubes C1, C2, C3… and spheres S1, S2, S3… are defined in the following way.
- S1 has radius 4cm.
- For each n > 0, Cn is inscribed in Sn and Sn+1 is inscribed in Cn (i.e. C1 is inscribed in S1, S2 is inscribed in C1, C2 is inscribed in S2 and so on).
Let Vn be the sum of the volumes of the first n cubes C1, C2,…, Cn. Then as n → ∞ Vn approaches
- 64(1+3√3)/13
- 384(1+3√3)/13
- What is the number of distinct squares in G(3,3)? Each square should have its vertices among the dots and its sides should be vertical or horizontal.
- 14
- 5
- 9
- 4
Let P be the product of any three consecutive positive odd integers each of which is less than 146. Then the largest integer dividing all such P is- 1
- 6
- 3
- 7
- 15
Aditya has 35 computer files that he wants to store on floppy disks. Each floppy disk has a capacity of 1.44 megabytes (MB). 2 of the files have size 0.8MB, 16 have size 0.7MB and the remaining 17 have size 0.4MB. No file can be split across floppy disks. What is the minimal number of floppy disks that will hold all these files?- 16
- 18
- 14
- 15
- 17
Given a 5 x 7 chessboard, a rook is placed at the lower left corner. Players A and B take turns moving the rook. A plays first and each turn consists of moving the rook horizontally to the right or vertically above. The last person to make a move wins the game. At the completion of the game, the rook will be at the top right corner. For example, the figure below shows a 3 x 4 chessboard and the sequence of moves that leads to a win for player A.What is a winning first move for A (in the given 5 x 7 chessboard) ?- There is no winning move, i.e. A has no winning strategy.
- Moving the rook 2 places above.
- Moving the rook 2 places to the right.
- Moving the rook 1 places above.
- Moving the rook 3 places to the right.
Mr. Decimal enters a lucky draw that requires him to pick five different integers from 1 through 31 inclusive. He chooses his five numbers in such a way that the sum of their logarithms to base 10 is an integer. It turns out that the winning 5 numbers have the same property, i.e. the sum of their logarithms to base10 is also an integer. What is the probability that Mr. Decimal holds the winning numbers?- 1/8
- 1/6
- 1
- 1/2
- 1/4
---------------------------------------------------------------------------------
No comments:
Post a Comment