1.There is a game which is being played by 2 persons A and B. The 2 players start the game keeping identical 50 paise coins on a blank board alternately. The 50 paise coins can be kept in the board such that no part of the coin is outside the board. It can touch the board edge but cannot protrude outside the board. The two players can place the coins anywhere on the board. The coins placed during the course of the game can touch each other at the periphery but cannot overlap with the already placed coins.
The player who has space to place the last coin is the winner i.e the player placing the last coin on the board with no space available for the opponent is the winner. If you are one of the players, what will your strategy be so that you definitely win?
Answer:-
1. I shall keep...
Tuesday, 18 October 2011
Java Important Interview FAQ
What are Encapsulation, Inheritance and Polymorphism?- Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse. Inheritance is the process by which one object acquires the properties of another object. Polymorphism is the feature that allows one interface to be used for general class actions.
What is OOPs?- Object oriented programming organizes a program around its data, i. e. , objects and a set of well defined interfaces to that data. An object-oriented program can be characterized as data controlling access to code.
What are Class, Constructor and Primitive data types?- Class is a template for multiple objects with similar features and it is a blue print for objects. It defines...
Written interview apptitude Questions II
46. Six swimmers A, B, C, D, E, F compete in a race.
The outcome is as
follows.
i. B does not win.
ii. Only two swimmers separate E & D
iii. A is behind D & E
iv. B is ahead of E , with one swimmer intervening
v. F is a head of D
1. Who stood fifth in the race ?
(a) A
(b) B
(c) C
(d) D
(e) E
Ans: (e)
2. How many swimmers seperate A and F ?
(a) 1
(b) 2
(c) 3
(d) 4
(e) cannot be determined
Ans: (d)
3. The swimmer between C & E is
(a) none
(b) F
(c) D
(d) B
(e) A
Ans: (a)
4. If the end of the race, swimmer D is disqualified
by the Judges
then swimmer B finishes in which place
(a) 1
(b) 2
(c) 3
(d) 4
(e) 5
Ans: (b)
47. Five houses lettered A,B,C,D, & E are built in a
row next to each
other. The houses are lined up in the order A,B,C,D, &
E. Each of the
five houses has a colored...