TCS Company

a = 16, b = 15, c = 3
if (c divides a) {
if (b > c) {
x = 1
} else {
x = 2
}
} else {
if (c divides b) {
x = 3
} else {
x = 4
}
}

Read Solution (Total 5)

TCS Other Question

Given a 9 x 14 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 9 x 14 chessboard) ?


If all chairs are wooden objects and some furniture are chairs, which of the following statements must be true?
I. All chairs are furniture.
II. Some wooden objects are furniture.
III. Some chairs are not furniture

• II only

• None of them are true

• II and III only

• III only

• I only