Software Companies Placement Papers With Answers- Aspire-Free Download
1. What is abstract class?
Abstract cls contains abstract methods and abstract data members,
abstract methods are methods with out definition. Abstract class can
also contain non abstract methods ie., method with definition. We
cannot create object for abstract cls. Abstract cls are inherited by
derived classes and they should implement all the abstract methods of
the inherited abstract class.
2. Why we cant create object for abstract class?
To create an object of any class its mandatory to know that how much
memory required to load the class so in case of abstract class its
can't be calculated for abstract members thats why we can't create
object of Abstract class
An Abstract class is a partial implementation of a class. In other
words, at least some of the operations or methods are implemented, but
the full implementation is left up to an inherited class.
Without a full implementation, how could we instantiate the class? What
if the client was to call one of the abstract (not defined) operations?
Obviously, this would result in a failure.
3. What is Encapsulation?
Encapsulation is the process of grouping up of datamembers and member
4. Give an Example for Encapsulation?
Class encapsulates data member and member function. These function and
data members are inaccessible to outside environment.
5. Why java does not support multiple inheritances?
1) First reason is ambiguity around Diamond problem, consider a class A
has foo() method and then B and C derived from A and has there own
foo() implementation and now class D derive from B and C using multiple
inheritance and if we refer just foo() compiler will not be able to
decide which foo() it should invoke. This is also called Diamond
problem because structure on this inheritance scenario is similar to 4
edge diamond, see below
foo() B C foo()
2) Multiple inheritances does complicate the design and creates problem
during casting, constructor chaining etc
6. When finally block will not be executed?
When try or catch block calls System.exit(), then finally block will
not be executed.
If the jvm exits while the try or catch code is being executed, then
the finally block may not execute. Likewise, if the thread executing
the try or catch code is interrupted or killed, the finally block may
not execute even though the application as a whole continues.
7. Programs: (Reverse the string without using inbuilt function)
cout<<"Enter the string";
8. Program: (print triangle in following format)
3 6 9
4 8 12 16
5 10 15 20 25
cout<<"Enter the limit ie the number of rows";
cin>>n; //here n=5;
In a class composed of x girls and y boys what part of the class is
composed of girls
A.y/(x + y)
C.x/(x + y)
10.What is the maximum number of half-pint bottles of cream that can be
filled with a 4-gallon can of cream(2 pt.=1 qt. and 4 qt.=1 gal)
11.If the operation,^ is defined by the equation x ^ y = 2x + y, what
is the value of a in 2 ^ a = a ^ 3
12.A coffee shop blends 2 kinds of coffee, putting in 2 parts of a 33p.
a gm. grade to 1 part of a 24p. a gm .If the mixture is changed to 1
part of the 33p. a gm. to 2 parts of the less expensive grade ,how much
will the shop save in blending 100 gms .
13.There are 200 questions on a 3 hr examination.Among these questions
are 50 mathematics problems.It is suggested that twice as much time be
spent on each maths problem as for each other question.How many minutes
should be spent on mathematics problems
14.In a group of 15,7 have studied Latin, 8 have studied Greek, and 3
have not studied either.How many of these studied both Latin and Greek
15.If 13 = 13w/(1-w) ,then (2w)2 =
16. If a and b are positive integers and (a-b)/3.5 = 4/7, then
(A) b < a
(B) b > a
(C) b = a
(D) b >= a
17. In June a baseball team that played 60 games had won 30% of its
game played. After a phenomenal winning streak this team raised its
average to 50% .How many games must the team have won in a row to
attain this average?
18. M men agree to purchase a gift for Rs. D. If three men drop out how
much more will each have to contribute towards the purchase of the
19. A company contracts to paint 3 houses. Mr.Brown can paint a house
in 6 days while Mr.Black would take 8 days and Mr.Blue 12 days. After 8
days Mr.Brown goes on vacation and Mr. Black begins to work for a
period of 6 days. How many days will it take Mr.Blue to complete the
20. 2 hours after a freight train leaves Delhi a passenger train leaves
the same station travelling in the same direction at an average speed
of 16 km/hr. After travelling 4 hrs the passenger train overtakes the
freight train. The average speed of the freight train was?
21. If 9x-3y=12 and 3x-5y=7 then 6x-2y = ?
22. There are 5 red shoes, 4 green shoes. If one draw randomly a shoe
what is the probability of getting a red shoe
Ans 5c1/ 9c1
23. What is the selling price of a car? If the cost of the car is Rs.60
and a profit of 10% over selling price is earned
Ans: Rs 66/-
24. 1/3 of girls, 1/2 of boys go to canteen .What factor and total
number of classmates go to canteen.
Ans: Cannot be determined.
25. The price of a product is reduced by 30% . By what percentage
should it be increased to make it 100%
26. There is a square of side 6cm . A circle is inscribed inside the
square. Find the ratio of the area of circle to square.
27. There are two candles of equal lengths and of different thickness.
The thicker one lasts of six hours. The thinner 2 hours less than the
thicker one. Ramesh lights the two candles at the same time. When he
went to bed he saw the thicker one is twice the length of the thinner
one. How long ago did Ramesh light the two candles .
Ans: 3 hours.
28. If M/N = 6/5,then 3M+2N = ?
29. If p/q = 5/4 , then 2p+q= ?
30. If PQRST is a parallelogram what it the ratio of triangle PQS &
parallelogram PQRST .
31. The cost of an item is Rs 12.60. If the profit is 10% over selling
price what is the selling price ?
Ans: Rs 13.86/-
32. There are 6 red shoes & 4 green shoes . If two of red shoes are
drawn what is the probability of getting red shoes
33. To 15 lts of water containing 20% alcohol, we add 5 lts of pure
water. What is % alcohol.
Ans : 15%
34. A worker is paid Rs.20/- for a full days work. He works
1,1/3,2/3,1/8.3/4 days in a week. What is the total amount paid for
that worker ?
Ans : 57.50
35. If the value of x lies between 0 & 1 which of the following is
Source: Contents are provided by Technicalsymposium Google Group Members.
Disclaimer: All the above contents are provided by technicalsymposium.com Google Group members.
Further, this content is not intended to be used for commercial purpose. Technicalsymposium.com is not liable/responsible for any copyright issues.