# 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
functions.

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

A foo()

/ \

/ \

foo() B C foo()

\ /

\ /

D

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)

void main()

{

char n[10];

int i=0,count=0;

cout<<"Enter the string";

gets(n);

while(n[i]!='\0')

{

count+=count;

n++;

}

while(count>=0)

{

cout<<n[count];

count--;

}

}

output:

SINDHU

UHDNIS

8. Program: (print triangle in following format)

format:

1

2 4

3 6 9

4 8 12 16

5 10 15 20 25

void main()

{

int n,c=1,k;

cout<<"Enter the limit ie the number of rows";

cin>>n; //here n=5;

for(int i=0;i<n;i++)

{

k=c;

for(j=0;j<=i;j++)

{

cout<<'\t'<<k;

k=k+c;

cout<<'\t';

}

cout<<'\n';

c++;

}

}

**
In a class composed of x girls and y boys what part of the class is
composed of girls
**

A.y/(x + y)

B.x/xy

C.x/(x + y)

D.y/xy

**Ans.C**
**
**

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)

A.16

B.24

C.30

D.64

**Ans.D**
**
**

11.If the operation,^ is defined by the equation x ^ y = 2x + y, what
is the value of a in 2 ^ a = a ^ 3

A.0

B.1

C.-1

D.4

**Ans.B**
**
**

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 .

A.Rs.90

B.Rs.1.00

C.Rs.3.00

D.Rs.8.00

**Ans.C**
**
**

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

A.36

B.72

C.60

D.100

**Ans.B**
**
**

** **

** **

**
**

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

A.0

B.3

C.4

D.5

**Ans.B**
**
**

15.If 13 = 13w/(1-w) ,then (2w)^{2 }=

A.1/4

B.1/2

C.1

D.2

**Ans.C**
**
**

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

**Ans. 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?

**
A. 12
**

B. 20

C. 24

D. 30

**Ans. C**
**
**

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
gift/

**
A. D/(M-3)
**

B. MD/3

C. M/(D-3)

D. 3D/(M^{2}-3M)

**Ans. D**
**
**

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
contract?

**
A. 7
**

B. 8

C. 11

D. 12

**Ans.C**

**
**

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?

**
A. 30
**

B. 40

C.58

D. 60

**Ans. B**

**
**

21. If 9x-3y=12 and 3x-5y=7 then 6x-2y = ?

**
A.-5
**

B. 4

C. 2

D. 8

**Ans. D**

**
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 5c**_{1}/ 9c_{1}
**
**

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%

**Ans: 42.857%**
**
**

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.

**Ans. 11/14 **

**
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 .
**

**Ans: 1:2 **

**
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
**

**Ans: 6c**_{2}/10c_{2}

**
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
the largest?
**

**
(a) x
**

(b) x^{2}

(c) -x

(d) 1/x

## 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.