You are on page 1of 29

APTITUDE QUESTIONS BY HAREESH

Compound Interest - Aptitude test questions and answers


Q1. Find the Amount and the compound interest on Rs. 4000 compounded annually for 2
yr. at the rate of 12 % per annum ?
A)Rs. 5017.60 Rs. 1017.60
B)Rs. 6000 Rs. 2000
C)Rs. 5000 Rs. 1000
D)Rs. 6500 Rs. 2500
View Answer / Hide Answer
ANSWER: A)Rs. 5017.60 Rs. 1017.60

Q2. The Compound Interest on Rs. 44000 compounded semi- annually for 3/2 year at the
rate of 6% per annum is:
A) Rs.2640.00
B) Rs.2648.00
C) Rs.4079.98
D) Rs.3010.43
View Answer / Hide Answer
ANSWER: C) Rs.4079.98

Q3. Find the amount invested for 3 yr. compounded yearly @ 12% per annum will amount
to Rs.10000?
A)7117.80
B)8117.80

C)9000.00
D)6500.00
View Answer / Hide Answer
ANSWER: A)7117.80

Q4.Find the amount and the compound interest on Rs. 20000 compounded quarterly for 9
months at the rate of 12% per annum is
A)Rs.29000 and Rs.9000
B)Rs.32000 and Rs.12000
C)Rs.28098.56 and Rs.8098.56
D)Rs.24082.10 and Rs.4082.10
View Answer / Hide Answer
ANSWER: C)Rs.28098.56 and Rs.8098.56

Q5. A sum of Rs. 3200 invested at 10% per annum compounded quarterly amounts to Rs.
3362. Then the time period is
A)8 months
B)7months
C)6months
D)5months
View Answer / Hide Answer
ANSWER: C)6months

Q6.The amount and compound interest on Rs. 30000 compounded annually for 4 year
@5%p.annum is

A)Rs.36465 and Rs.6465


B)Rs.40000 and Rs.10000
C)Rs.34656 and Rs.4656
D)Rs.38000 and Rs.8000
View Answer / Hide Answer
ANSWER: A)Rs.36465 and Rs.6465

Q7. The compound interest on Rs. 10000 for 2 yr if the rate of interest is 8% p.annum for
the first year and 4% for the second year is
A)11232 and 1232
B)12000 and 2000
C)14000 and 4000
D)16232 and 6232
View Answer / Hide Answer
ANSWER: A)11232 and 1232

Q8. What will be the compound interest on Rs. 120000 for 4 yr at 2% for first year, 4% for
second year, 6% for third year and 8% for fourth year?
A)25728.46
B)145728.48
C)189200.00
D)223232.46
View Answer / Hide Answer
ANSWER: A)25728.46

Q9. The difference b/w the Compound Interest and the simple interest on a certain sum at

5% per annum for 3 yr. is Rs.1000. Then the sum is


A)121421.80
B)131578.95
C)152421.98
D)182124.80
View Answer / Hide Answer
ANSWER: B)131578.95

Q10. The population of the Hyderabad increases each year by 10% of what it had been at
the beginning of each year. If the population in 1990 had been 160000, then the population
of the Hyderabad in 1993.
A)52960
B)190000
C)180000
D) 212960
View Answer / Hide Answer
ANSWER: D) 212960

Q11. The population of the Hyderabad increases each year by 10% of what it had been at
the beginning of each year. If the population in 1990 had been 160000, then the population
of the Hyderabad in 1987.
A)130000
B)123452
C)134500
D) 116640
View Answer / Hide Answer
ANSWER: D) 116640

Q12. Karan started the business with an initial investment of Rs. 100000.In the first year
he earned a profit of 4 % however, during the second year , he earned a loss of 8%. Then
the net profit/loss for the entire period of 2 yr. is
A)4320 loss
B)3680 profit
C)1200 profit
D) No Profit or loss.
View Answer / Hide Answer
ANSWER: A)4320 loss

Q13. Ram purchased a cell phone for Rs.8000.The value of cell phone is decreasing @ 8%
p.a. Then its value after three years is
A)6229.50
B)6300.50
C)6400.22
D)6743.80
View Answer / Hide Answer
ANSWER: A)6229.50

Q14. An amount of Rs.A at compound interest @5% per annum for 4 yr. becomes B. What
is B?
A)1.21A
B)2.41A
C)121A
D)241A
View Answer / Hide Answer

ANSWER: A)1.21A

Q15. The compounded interest on Rs.120 for 1 yr. @ 16% per annum, when the interest is
compounded annually
A)139.20
B)149.20
C)19.20
D)136.00
View Answer / Hide Answer
ANSWER: C)19.20

Q16. The amount Puja will pay on Rs. 12000@16% per annum, when the interest is
compounded semi-annually
A)15116.54
B)18730.75
C)1392.00
D)3116.54
View Answer / Hide Answer
ANSWER: A)15116.54

Q17. A certain sum invested at 4% per annum compounded semi-annually amounts to


Rs.12800 at the end of one year.
A)12800.00
B)12300.00
C)12302.96
D)12303.00

View Answer / Hide Answer


ANSWER: C)12302.96

Q18. What will be the period of investment ,If Rs.16000 invested at 10% per annum
compounded semi-annually amounts to Rs.18522.
A)3/2 year
B)7/2 year.
C)2year
D)4year
View Answer / Hide Answer
ANSWER: A)3/2 year

Q19. A promoter invested Rs. 6000 in a company at compound interest compounded semiannually .He receives Rs.7986 after 18 months from the company the rate of interest per
annum is
A)13%
B)21%
C)20%
D)18%
View Answer / Hide Answer
ANSWER: C)20%

Q20. A sum compounded annually becomes 16/9 times of itself in 2 yr. then the rate of
interest per annum is
A)66.66%
B)40.00%

C)54.44%
D)33.33%
View Answer / Hide Answer
ANSWER: D)33.33%
Compound Interest - Aptitude test questions and answers
Compound Interest 10-10-2013 04:55 AM
Q21. Rams income doubles at compound interest in 8yr. His income will becomes 4 times
in
A)16 year
B)20 year
C)32 year
D)15 year
View Answer / Hide Answer
ANSWER: A)16 year

Q22. Deepak borrowed 10000 for 1 and 1/2 year @ 10% per annum compounded semianually. What is the compound interest?
A)6620
B)3310
C)2500
D)2520
View Answer / Hide Answer
ANSWER: B)3310

Q23.Vivek deposited Rs.500 at compound interest becomes double after 5yr. What will be
the amount after 20 yr.

A)2000
B)16000
C)8000
D)4000
View Answer / Hide Answer
ANSWER: C)8000

Q24.The simple interest on a certain sum of money for 2yr.@ 4% p.a. is quarter the
compound interest on Rs.20000 for 2 yr. at 10% p.a. What is the sum placed on simple
interest?
A)13125
B)16125
C)14200
D)15200
View Answer / Hide Answer
ANSWER: A)13125

Q25. Alok borrowed an amount of Rs.12000 on C.I. @ 10% p.annum . Find the amount
payable by Alok after 2 yr.?
A)15520
B)14420
C)16000
D)14520
View Answer / Hide Answer
ANSWER: D)14520

Q26. The difference between C.I. and S.I. on an amount @ 12% p.a. in 2 yrs is Rs. 200.
Find the amount
A)13888.88
B)2000.50
C)4578.80
D)12432.00
View Answer / Hide Answer
ANSWER: A)13888.88

Q27. Find the C.I. on Rs.2000 for 3 yr. @10%p.annum, when compounded half-yearly
A)2680
B)2600
C)600
D)680
View Answer / Hide Answer
ANSWER: D)680

Q28. If a sum of Rs.2000 is compounded annually @ 5% for two year and 10% for next
two year, then find the total amount after 4 year.
A)2668.05
B)668.05
C)4668
D)2800
View Answer / Hide Answer
ANSWER: A)2668.05

Q29. At compound interest, if a interest sum of money doubles in n years, then the
amount will be eight times in
A)2n2
B)3n2
C)3n
D)n2
View Answer / Hide Answer
ANSWER: C)3n

Q.30 Co-operative Bank gives interest which compounds anually. Ramesh deposited
Rs.10000 and received Rs.12100 at the end of second year.Then find the rate of compound
interest ?
A)20%
B)10%
C)12 and
D)13 and 1/2
View Answer / Hide Answer
ANSWER: B)10%

Q.31 Sohan took Rs.1100 from Vijay. Sohan have to pay Rs.1100 to Vijay in two
installments. If the rate of interest be 10% compounded annually, then the value of each
installment is
A)633.80
B)311.80
C)345.80
D)631.00
View Answer / Hide Answer

ANSWER: A)633.80

Q.32 The C.I. on Rs. 8000 for 3 yr. @2% for first year , 4% for second year, and 6% for
third year will be
A)8995.58
B)995.58
C)9000.00
D)1000.00
View Answer / Hide Answer
ANSWER: B)995.58

Q33. Vinay divide Rs.2000 Between Dinesh and Taruna, so that the amount of Dinesh after
5 years is equal to the amount of Taruna after 7 years, the interest being compounded
@5%p.annum. So the two parts are
A)1048.75 and 951.24
B)1100 and 900
C)1250 and 750
D) 1300 and 700
View Answer / Hide Answer
ANSWER: A)1048.75 and 951.24

Q34. Find Compound Interest on Rs.200 @ 2% per annum for 3 years, compounded
annually?
A)231.525
B)31.52
C)233.33
D)212.22

View Answer / Hide Answer


ANSWER: B)31.52

Q35. Find the Amount on Rs.2000 @ 15% per annum for 2 years 4 months, compounded
annually?
A)777.25
B)2777.25
C)2927.05
D)999.95
View Answer / Hide Answer
ANSWER: B)2777.25

Q36. Find the amount on Rs.1500 in 2 years @ 8%per annum, the interest being
compounded half-yearly?
A)1621.15
B)121.15
C)1721.15
D)None of these
View Answer / Hide Answer
ANSWER: A)1621.15

Q37.In how many years will Rs. 1000 becomes Rs.1331 @10%per annum compounded
annually?
A)3 and 1/2 years
B)2 and 1/2 years

C) 1 and 1/2 years


D) 3 years
View Answer / Hide Answer
ANSWER: D) 3 years

Q38. Find the Compound interest on Rs.30000 for 2 years @ 7% per annum compounded
yearly?
A)4743
B)4347
C)4400
D)4231
View Answer / Hide Answer
ANSWER: B)4347

Q39. A sum of Rs. 125000 invested at 4% per annum compounded half-yearly amounts to
Rs.132651. Then the time period is
A) 1 and 1/2 years
B) 2 and 1/2 years
C) 3 and 1/2 years
D) 7 and 1/2 years
View Answer / Hide Answer
ANSWER: A) 1 and 1/2 years

Q40. Find the amount on Rs.1200 in 2 years @ 6%per annum, the interest being
compounded yearly?

A)1248.28
B)1348.32
C)1288.20
D)1298.20
View Answer / Hide Answer
ANSWER: B)1348.32

Q41. If Rs.16000 amounts to Rs.18522 in 1 and 1/2 years compounded semi-annually, find
the rate of interest per annum.
A)12%
B)8%
C)10%
D)12.33%
View Answer / Hide Answer
ANSWER: C)10%

Q42. Find the time period, When sum of Rs.24000 invested @10% per annum
compounded semi-annually amounts to Rs.27783.
A) 1 and 1/2 years
B) 2 and 1/2 years
C) 3 and 1/2 years
D) 7 and 1/2 years
View Answer / Hide Answer
ANSWER: A) 1 and 1/2 years

Q43. Find the Amount and the compound interest on Rs. 1000 compounded annually for 2

yr. at the rate of 6 % per annum ?


A)Rs. 1122.32 and Rs. 122.32
B)Rs. 1200 and Rs. 200
C)Rs. 1230 and Rs.230
D)Rs. 1234 and Rs. 234
View Answer / Hide Answer
ANSWER: A)Rs. 1122.32 and Rs. 122.32

Q44. Find the rate of interest when a sum of money invested at compound interest amounts
to Rs.800 in 3 years and to Rs.840 in 4 years.
A)6%
B)5%
C)4%
D)8%
View Answer / Hide Answer
ANSWER: B)5%

Q45. A sum compounded annually becomes 25/16 times of itself in 2 yr. Then the rate of
interest per annum is
A)54%
B)34%
C)28%
D)25%
View Answer / Hide Answer
ANSWER: D)25%

Q46. Find the compound interest on Rs.24000 is borrowed for 1 and 1/2 year @10% p.a.
compounded semi-annually.
A)3782.4
B)27782.4
C)28782.5
D)25782.4
View Answer / Hide Answer
ANSWER: A)3782.4

Q47.An amount at compound interest doubles itself in 4 yr. In how many years will the
amount become 8 times itself?
A)8 yr
B)12yr.
C)10yr.
D)11 yr.
View Answer / Hide Answer
ANSWER: B)12yr.

Q48. If the population of a village depreciates by 10% of its value at the beginning of the
year and its present population is estimated as 10935, what was its value three years back?
A)12000
B)14000
C)15935
D)15000
View Answer / Hide Answer
ANSWER: D)15000

Q49. The difference between simple and compound interest for two years @5% per annum
is Rs.25.Find the sum
A)5000
B)7500
C)8500
D)10000
View Answer / Hide Answer
ANSWER: D)10000

Q50. Find the time period, When sum of Rs.7500 invested @4% per annum compounded
annually amounts to Rs.8112.
A)3years
B)3 and 1/2 years
C) 2 years
D) 4 years.
View Answer / Hide Answer
ANSWER: C) 2 years

Quantitative:
1. 3 angles or 3 sides r given.Which will form a triangle?
2. units of basic quantities :
1. (energy * time * time )/(mass * dist) = distance
2. (momentum * velocity)/(force * time) = velocity
3.& is for doubling the value % is for change of sign then what
is the value
5-&%&5 Ans-30 (Check)
3. 58,27,12,x,2,1. Find x.
4. R-rounding off, M-modulus, T-truncate M(893,10)+r( )+t( ) is
asked
5.vertices edges and surfaces of a cube Ans-8,12,6
6.Sums on Recursive functions
7.Questions on General computer awareness
Pick the odd one..
1.http 2.arp 3.snmp 4.sap Ans-sap
1.linux 2.windows NT 3.sql server 4.Unix Ans-Sql server
Another..ans-Smtp
Ans-MVS
8. Which of the following is a singular matrix. (Determinant must
be zero)
9. Aeroplane is flying at a particular angle and latitude,after some
time another latitude is given..(8 hrs later), u r asked to find the
local time of the place.
10.a series of letters are given
how many Ws r followed by F and preceded by T.
11. 7,9,13,_,27,37. Ans-19
12.SURFW Code is translated as SHEET..these kinda ques r
there?
13.194 base 10 = ____ base 5 (1234)
14.Largest prime no. in a 6 bit,8 bit (Ans 127),9 bit
microprocessor
15.Venn Diagram kinda ques.
Some know English, some French,some Germanhow many

know two languages..


16.Bar Diagram, Pie Chart (similar to Data interpretation)
17.Code Interchanging, A word is given. Letters are reversed..u
r asked to find the nth letter from right or left.
Eg. DESTABILIZATION Ans-T
18. Sums on logarithms, e power x curves.
19.n=68 x 12 x 51
Which of the follg is not an integer Ans- n/122
20.Which is a/not a power of 2 or 3.
Power of 4 Ans-4096

REASONING:1.
2.
A
B
C

5,6,7,8,10,11,14?
1
0
0
1
1
0
(AuB)nC = ?

0
1
0
0
0
1
0
1
0
1
0
1
0
1
1
[(A union B) intersection C =?]

1
0
0

3.
Find the Odd word.
Java, Lisp, Smalltalk, Eiffel
(One more question of same type - Odd man out)
4.
Year 95 96
Members 100 1

97
70

98
10

99
50

i ) Which year has maximum members growth?


Two more questions on this. Please go
Through Barons GRE data interpretation problems
5. In Madras, temperature at noon varies according to -t^2/2 + 8t + 3 (READ as: -t square /2
+...), where t is elapsed time. Find how much temp. More or less in 4pm to 9pm. (May be we can
solve it by Definite Integration. Check any way)
6.
A man, a woman, and a child can do a piece of work in 6 days. Man only can do it in 24
days. Woman can do it in 16 days and in how many days child can do the same work? (Numbers
are not correct. Problem model is important)
7.

What is the highest prime number that can be stored in a 8-bit microprocessor?

8.
In which of the system 384 is equal to 1234? (Numbers are not correct. Important is only
problem model)
9.

If D_MUQZM is coded as CENTRAL then RBDJK can be coded as ---------

10.
The size of a program is N. And the memory occupied by the program is given by M =
square root of 100N. If the size of the program is increased by 1% then how much memory now
occupied?
11. French, English, German
1.How many more or less speak English than French?

2.What % people speak all the three languages?


3.What % people speak German but not English?
12.
The size of the bucket is N KB. The bucket fills at the rate of 0.1 KB per millisecond. A
programmer sends a program to receiver. There it waits for 10
Milliseconds. And response will be back to programmer in 20 milliseconds.
Based on above information one question is there.
13.
A power unit is there by the bank of the river 750 mts. A cable is made from power unit
to power a plant opposite to that of the river at 1500mts. The cost of the cable below water is Rs.
15/- per meter ansd cost of cable on the bank is Rs. 12/- per meter.
Based on above information one question is there.
14.
Match the following.
i. brother - sister
a. Part of
ii. alsecian - dog
b. Sibling
iii. sentence - paragraph
c. Type of
iv.
d.
15.
If the vertex (5,7) is placed in the memory. First vertex (1,1) 's address is 1245 and then
address of (5,7) is ---------16.
A Planar solid cube contains how many vertices, how many corner points and how many
faces?
17.

Which of the equation satisfies the graph? 4 equations given.

18.
Square of the <<term>> is directly proportional to the cube of the <<another term>> . If
the <<term>> is 'a' and <<another term>> is 'b' then which one is correct?
4 options given like a square / b cube =const.

QUANTITATIVE SECTION
1. If two pencils cost 8 cents, then how much do 5 pencils cost?
Ans. 20 cents
2. Some work is done by two people in 24 minutes. One of them can do this work alone in 40
minutes. How much time does the second person take to do the same work ?
Ans. 60 minutes
3. A car is filled with four and half gallons of fuel for a round trip.If the amount of fuel taken
while going is 1/4 more than the amount taken for coming, what is the amount of fuel consumed
while coming back?
Ans.2 gallons

4. The lowest temperature in the night in a city A is 1/3 more than 1/2 the highest during the day.
Sum of the lowest temperature and the highest temperature is 100 degrees. Then what is the low
temp?
Ans.40 degrees
5. Javagal, who decided to go to weekened trip should not exceed 8 hours driving in a day. The
average speed of forward journey is 40 miles/hr.Due to traffic on sundays, the return journey's
average speed is 30 m/h. How far he can select a picnic spot?
a) 120 miles
b) between 120 and 140 miles
c) 160 miles
Ans. 120 miles
6. A salesperson by mistake multiplied a number and got the answer as 3, instead of dividing the
number by 3.What is the answer he should have actually got?
Ans. 3
7. A building with height D shadow upto G. What is the height of a neighbouring building with a
shadow of C feet.
Ans. (C*D)/G
8. A person was fined for exceeding the speed limit by 10 mph. Another person was also fined
for exceeding the same speed limit by twice the same. If the second person was travelling at a
speed of 35 mph, find the speed limit.
Ans. 15 mph
9. A bus started from bustand at 8.00am, and after staying for 30 minutes at a destination, it
returned back to the busstand. The destination is 27 miles from the busstand. The speed of the
bus is 18mph. During the return journey bus travels with 50% faster speed.At what time does it
return to the busstand?
Ans. 11.00am
10. In a mixture, R is 2 parts and S is 1 part. In order to make S to 25% of the mixture, how
much of R is to be added?
Ans.One part of R
11. Wind flows 160 miles in 330 min, for travelling 80 miles how much time does it require?
Ans. 2 hrs 45 mins
12. With a 4/5 full tank a vehicle can travel 12 miles, how far can it travel with a 1/3 full tank
Ans. 5 miles
13. There are two trees in a lawn. One grows at a rate 3/5 of the other in 4 years. If the total
growth of trees is 8 ft. What is the height of the smaller tree after 2 years
Ans. 1 1/2 feet

14. Refer to the figure below.A ship started from P and moves at a speed of I miles per hour and
another ship starts from L and moving with H miles per hour simultaneously.Where do the two
ships meet?
||---g---||---h---||---i---||---j---||---k---||---l---||
PG H I J K L are the various stops in between denoted by || . The values g, h, i, j, k, l denote the
distance between the ports.
Ans. Between I and J, closer to J
15. If A is travelling at 72 km per hour on a highway. B is travelling at a speed of 25 meters per
second on a highway. What is the difference in their speeds in m/sec.
Ans. 1 m/sec

QUANTITATIVE SECTION
1. There are 150 weights .Some are 1 kg weights and some are 2 kg weights. The sum of the
weights is 260.What is the number of 1kg weights?
Ans. 40
2. A is driving on a highway when the police fines him for overspeeding and exceeding the limit
by 10 km/hr.At the same time B is fined for overspeeding by twice the amount by which A
exceeded the limit.If he was driving at 35 km/hr what is the speed limit for the road?
Ans. 15 kmph
3. A moves 3 kms east from his starting point . He then travels 5 kms north. From that point he
moves 8 kms to the east.How far is A from his starting point?
Ans. 13 kms
4. A car travels 12 kms with a 4/5th filled tank.How far will the car travel with 1/3 filled tank?
Ans. 5 kms
5. The sum of the digits of a two digit number is 8. When 18 is added to the number, the digits
are reversed. Find the number?
Ans. 35
6. The cost of one pencil, two pens and four erasers is Rs.22 while the cost of five pencils, four
pens and two erasers is Rs.32.How much will three pencils, three pens and three erasers cost?
Ans. 27
7. Fathers age is 5 times his son's age. 4 years back the father was 9 times older than son.Find the
fathers' present age.
Ans. 40 years

8. What number should be added to or subtracted from each term of the ratio 17 : 24 so that it
becomes equal to 1 : 2.
Ans. 10 should be subtracted
9. What is the 12th term of the series 2, 5, 8, ....
Ans. 35
10. If 20 men take 15 days to to complete a job, in how many days can 25 men finish that work?
Ans. 12 days
11. In a fraction, if 1 is added to both the numerator at the denominator, the fraction becomes 1/2.
If numerator is subtracted from the denominator, the fraction becomes 3/4. Find the fraction.
Ans. 3/7
12. If Rs.1260 is divided between between A, B and C in the ratio 2:3:4, what is C's share?
Ans. Rs. 560
13. A shopkeeper bought a watch for Rs.400 and sold it for Rs.500.What is his profit percentage?
Ans. 25%
14. What percent of 60 is 12?
Ans. 20%
15. Hansie made the following amounts in seven games of cricket in India: Rs.10, Rs.15, Rs.21,
Rs.12, Rs.18, Rs.19 and Rs.17(all figures in crores of course).Find his average earnings.
Ans. Rs.16 crore

Integer and
Language.

Floating

Datatypes

of

Java

Programming

1. What is the range of data type short in Java?


a) -128 to 127
b) -32768 to 32767
c) -2147483648 to 2147483647
d) None of the mentioned
View Answer
Answer:b
Explanation:Short occupies 16 bits in memory. Its range is from -32768 to 32767.
2. What is the range of data type byte in Java?
a) -128 to 127
b) -32768 to 32767
c) -2147483648 to 2147483647
d) None of the mentioned
View Answer
Answer:a
Explanation:Byte occupies 8 bits in memory. Its range is from -128 to 127.
3. Which of the following are legal lines of Java code?
1. int w = (int)888.8;
2. byte x = (byte)100L;
3. long y = (byte)100;
4. byte z = (byte)100L;
a) 1 and 2
b) 2 and 3
c) 3 and 4
d) All statements are correct.
View Answer
Answer: d
Explanation:Statements (1), (2), (3), and (4) are correct. (1) is correct because when a floatingpoint number (a double in this case) is cast to an int, it simply loses the digits after the decimal.
(2) and (4) are correct because a long can be cast into a byte. If the long is over 127, it loses its
most significant (leftmost) bits.(3) actually works, even though a cast is not necessary, because a
long can store a byte.
4. An expression involving byte, int, and literal numbers is promoted to which of these?
a) int
b) long
c) byte

d) float
View Answer
Answer: a
Explanation:An expression involving bytes, ints, shorts, literal numbers, the entire expression is
promoted to int before any calculation is done.
5. Which of these literals can be contained in a data type float variable?
a) 1.7e-308
b) 3.4e-038
c) 1.7e+308
d) 3.4e-050
View Answer
Answer: b
Explanation:Range of data type float is 3.4e-038 to 3.4e+308.
6. Which data type value is returned by all transcendental math functions?
a) int
b) float
c) double
d) long
View Answer
Answer:c
Explanation:None.
7. What is the output of this program?
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.

class average {
public static void main(String args[])
{
double num[] = {5.5, 10.1, 11, 12.8, 56.9, 2.5};
double result;
result = 0;
for (int i = 0; i < 6; ++i)
result = result + num[i];
System.out.print(result/6);
}

a) 16.34
b) 16.566666644
c) 16.46666666666667
d) 16.46666666666666
View Answer

Answer:c
Explanation:None.
output:
$ javac average.java
$ java average
16.46666666666667
8. What is the output of this program?
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

class conversion {
public static void main(String args[])
{
double a = 295.04;
int b = 300;
byte c = (byte) a;
byte d = (byte) b;
System.out.println(c + " " + d);
}
}

a) 38 43
b) 39 44
c) 295 300
d) 295.04 300
View Answer
Answer:b
Explanation:Type casting a larger variable into a smaller variable results in modulo of larger
variable by range of smaller variable. b contains 300 which is larger than bytes range i:e -128 to
127 hence d contains 300 modulo 256 i:e 44.
output:
$ javac conversion.java
$ java conversion
39 44
9. What is the output of this program?
1.
2.
3.
4.
5.
6.
7.

a) 25
b) 24
c) 32

class increment {
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}

d) 33
View Answer
Answer:c
Explanation:Operator ++ has more preference than *, thus g becomes 4 and when multiplied by
8 gives 32.
output:
$ javac increment.java
$ java increment
32
10. What is the output of this program?
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

class area {
public static void main(String args[])
{
double r, pi, a;
r = 9.8;
pi = 3.14;
a = pi * r * r;
System.out.println(a);
}
}

a) 301.5656
b) 301
c) 301.56
d) 301.56560000
View Answer
Answer:a
Explanation:None.
output:
$ javac area.java
$ java area
301.5656

You might also like