Sandeep Sharma             
About Me : --
Member Since :
24-Aug-2010
Articles Posted :
4
Answers Given :
13
Questions Asked :
9
no What does the term SOLID means in oops ?
A Generally SOLID is used as abbreviation  for the five principles Listed below:-

S-  Single Responsibility Principle (SRP)

O- Open/Close Principle (OCP)

  L- Liskov Substitution Principle (LSP)

  I- Interface Segregation Principle (ISP)

  D-Dependency Inversion Principle (DIP)

these principles are kept in mind while coding a class in a project.
no What is the solution of  Tower of Hanoi Problem if any body knows please explain or mail me at 8anuragsharma@in.com
A It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.

The objective of the puzzle is to move the entire stack to another rod, obeying the following rules:

1)  Only one disk may be moved at a time.
2)  Each move consists of taking the upper disk from one of the rods and sliding it onto  

     another rod, on top of the other disks that may already be present on that rod.
    
3) No disk may be placed on top of a smaller disk.

With three disks, the puzzle can be solved in seven moves.

Solution :

The puzzle can be played with any number of disks, although many toy versions have around seven to nine of them. The minimum number of moves required to solve a Tower of Hanoi puzzle is 2n - 1, where n is the number of disks.
no Which data structure is  used to perform recursion?
A Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller’ so knows
whom to return when the function has to return. Recursion makes use of system stack for storing the
return addresses of the function calls.
Every recursive function has its equivalent iterative (non-recursive) function. Even when
such equivalent iterative procedures are written, explicit stack is to be used.
no In what proportion must rice at Rs. 3.10 per kg. be mixed with rice at Rs. 3.60 per kg., so that the mixture be worth Rs. 3.25 a kg.?

a) 1 : 2    b) 2 : 1    c) 3 : 7    d) 7 : 3
A 7: 3
no Five bells begin to toll together and toll at intervals of 36, 45, 72, 81 and 108 seconds. After what interval of time will they toll together?

(a) 3240 sec
(b) 3080 sec
(c) 3140 sec
(d) 3200 se....
A Ans: a
The interval of time is L.CM. of the numbers 36, 45, 72, 81 and 108.
L.C.M (36, 45, 72, 108) = 3240
no What is LIFO?
A LIFO, which stands for "last-in-first-out," is an inventory costing method which assumes that the last items placed in inventory are the first sold during an accounting year. Thus, the inventory at the end of a year consists of the goods placed in inventory at the beginning of the year, rather than at the end. LIFO is one method used to determine Cost of Goods Sold for a business.
no what is multiple Inheritance ?
A It's Feature of oops in which one class can be inherited from more than one super class.
no In RDBMS, what is the efficient data structure used in the internal storage representation?
A Binary Tree
no How many Default Constructors can be possible in a class ?

A) One

B) Two

C) Three

D) Unlimited
A A is right answer !
Default Constructor is only one in a class.
no What is runtime polymorphism or dynamic method dispatch?
A In this  process a call to an overridden method is resolved at runtime rather than at compile-time and an overridden method is called through the reference variable of a superclass. The  determination of the method to be called is based on the object being referred to by the reference variable.
First  Prev 
 1   2 
Next  Last