0% found this document useful (0 votes)
323 views28 pages

Argusoft Round 2

The document contains various programming problems, reading comprehension exercises, and mathematical problems with their respective solutions. It highlights a Java post-increment trap, discusses reading comprehension strategies, and presents problem-solving scenarios involving chocolates, floods, and train fares. Additionally, it provides answers to each problem, demonstrating the application of logical reasoning and mathematical calculations.

Uploaded by

Ashish Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
323 views28 pages

Argusoft Round 2

The document contains various programming problems, reading comprehension exercises, and mathematical problems with their respective solutions. It highlights a Java post-increment trap, discusses reading comprehension strategies, and presents problem-solving scenarios involving chocolates, floods, and train fares. Additionally, it provides answers to each problem, demonstrating the application of logical reasoning and mathematical calculations.

Uploaded by

Ashish Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Brainstorming

int num = 0;

for (int i = 0; i < 5; i++) {


num = num++;
System.out.println(num);
}
Brainstorming

Solution:
Output:
0
0
0
0
0

This is a classic Java post-increment trap.


To actually increment num,
We use either: num++ (on its own) or num = num + 1 or ++num
Brainstorming

num = num++ is a tricky statement.

•num++ is post-increment: it returns the current value of num


before incrementing it.

•But since the result of num++ is assigned back to num, the


increment is lost
!

So, num stays the same.


Brainstorming

Loop Execution:

Initial value: num = 0


For each of the 5 iterations:
num = num++ does not change num
Print num (which is always 0)
Reading Comprehension

Often students become frustrated when they


have many assignments to do. Setting goals
and organizing time are important skills to
learn.
What does the second sentence do?
A. It gives an example.
B. It makes a contrast.
C. It proposes a solution.
D. It states an effect.
Reading Comprehension

Often students become frustrated when they


have many assignments to do. Setting goals
and organizing time are important skills to
learn.
What does the second sentence do?
A. It gives an example.
B. It makes a contrast.
C. It proposes a solution.
D. It states an effect.
Reading Comprehension

The Midwest is experiencing its worst drought


in 15 years. Corn and soybean prices are
expected to be very high this year.
What does the second sentence do?
A. It analyzes the statement made in the first.
B. It gives an example.
C. It states an effect.
D. It restates the idea found in the first.
Reading Comprehension

The Midwest is experiencing its worst drought


in 15 years. Corn and soybean prices are
expected to be very high this year.
What does the second sentence do?
A. It analyzes the statement made in the first.
B. It gives an example.
C. It states an effect.
D. It restates the idea found in the first.
Reading Comprehension
In 1848, Charles Burton of New York City made the first baby carriage, but
people strongly objected to the vehicles because they said the carriage
operators hit too many pedestrians. Still convinced that he had a good idea,
Burton opened a factory in England. He obtained orders for the baby
carriages from Queen Isabella II of Spain, Queen Victoria of England, and the
Pasha of Egypt. The United States had to wait another 10 years before it got a
carriage factory, and only 75 carriages were sold in the first year.
Even after the success of baby carriages in England,
A. Charles Burton was a poor man.
B. Americans were still reluctant to buy baby carriages.
C. Americans purchased thousands of baby carriages.
D. the United States bought more carriages than any other country.
Reading Comprehension
In 1848, Charles Burton of New York City made the first baby carriage, but
people strongly objected to the vehicles because they said the carriage
operators hit too many pedestrians. Still convinced that he had a good idea,
Burton opened a factory in England. He obtained orders for the baby
carriages from Queen Isabella II of Spain, Queen Victoria of England, and the
Pasha of Egypt. The United States had to wait another 10 years before it got a
carriage factory, and only 75 carriages were sold in the first year.
Even after the success of baby carriages in England,
A. Charles Burton was a poor man.
B. Americans were still reluctant to buy baby carriages.
C. Americans purchased thousands of baby carriages.
D. the United States bought more carriages than any other country.
Reading Comprehension

There are two types of pottery that I do. There is


production pottery—mugs, tableware, the kinds of things
that sell easily. These pay for my time to do the other
work, which is more creative and satisfies my needs as an
artist.
The author of the passage implies that:
A. artists have a tendency to waste valuable time
B. creativity and mass-production are incompatible
C. most people do not appreciate good art
D. pottery is not produced by creative artists
Reading Comprehension

There are two types of pottery that I do. There is


production pottery—mugs, tableware, the kinds of things
that sell easily. These pay for my time to do the other
work, which is more creative and satisfies my needs as an
artist.
The author of the passage implies that:
A. artists have a tendency to waste valuable time
B. creativity and mass-production are incompatible
C. most people do not appreciate good art
D. pottery is not produced by creative artists
Reading Comprehension
It is said that a smile is universally understood. And nothing triggers a smile
more universally than a taste of sugar. Nearly everyone loves sugar. Infant
studies indicate that humans are born with an innate love of sweets. Based
on statistics, a lot of people in Great Britain must be smiling because on
average, every man, woman, and child in that country consumes 95 pounds
of sugar each year.
From this passage it seems safe to conclude that the English:,
A. do not know that too much sugar is unhealthy.
B. eat desserts at every meal.
C. are fonder of sweets than most people.
D. have more cavities than any other people.
Reading Comprehension
It is said that a smile is universally understood. And nothing triggers a smile
more universally than a taste of sugar. Nearly everyone loves sugar. Infant
studies indicate that humans are born with an innate love of sweets. Based
on statistics, a lot of people in Great Britain must be smiling because on
average, every man, woman, and child in that country consumes 95 pounds
of sugar each year.
From this passage it seems safe to conclude that the English:,
A. do not know that too much sugar is unhealthy.
B. eat desserts at every meal.
C. are fonder of sweets than most people.
D. have more cavities than any other people.
Problem

Shailee Joshi likes Chocolates. For her Anniversary, she bought some
Chocolates. If she gives 6 Chocolates to each friend, one friend will get
only 4 Chocolates. Also, if she gives 4 Chocolates to each friend, she
will have 30 Chocolates remaining. How many Chocolates she got on
her Anniversary, and how many friends are there?
Problem
Shailee Joshi likes Chocolates. For her Anniversary, she bought some
Chocolates. If she gives 6 Chocolates to each friend, one friend will get only 4
Chocolates. Also, if she gives 4 Chocolates to each friend, she will have 30
Chocolates remaining. How many Chocolates she got on her Anniversary, and
how many friends are there?

Ans: 94 Chocolates & 16 Friends


Problem
In 1991, a devastating flood ravaged many districts of Bihar. A group of
villagers found itself confronted by a wide and deep flood water.
However, they found two children who were rowing a boat. But the
boat was so small that it can only carry either the 2 children, or 1
adult person and it can be rowed by single child or adult. Can the 246
villagers move across the flood water?

If yes, what is the minimum number of movements that the boat has
to make from shore to shore?
Problem
Given:
A boat can carry either:2 children, or 1 adult.
The boat can be rowed by either a child or an adult.
There are 246 adults.
2 children are available to help.
Goal: Get all 246 adults across the river using minimum boat
movements.
Problem
Strategy:
Only children can bring the boat back (since only one person can row
the boat and adults can't be left alone without the boat).
So, the process goes like this:
1. 2 children cross together.
2. 1 child returns.
3. 1 adult crosses alone.
4. 1 child returns.
This 4-step cycle moves 1 adult across and brings the boat back to the starting
side. But for the last adult, we don’t need to return the child.
Problem
Strategy:
For (n-1) adults:
(4×245) = 980 moves
For the last adult:
2 children go (1 move)
1 child returns (1 move)
1 adult goes (1 move)
→ No return needed. Total = 3 moves
So, total number of moves: 980+3 = 983 movements
Problem

A lorry driver, once in a week, leaves his house and drives to the
railway station to pick up supplies. At 6:00 PM, one-seventh of the
way to the station, he passes the Gurudwara. At 6:20 PM, one-third of
the way, he passes the Panjabi Dhaba. At what time does he reach the
station?
Problem

A lorry driver, once in a week, leaves his house and drives to the
railway station to pick up supplies. At 6:00 PM, one-seventh of the
way to the station, he passes the Gurudwara. At 6:20 PM, one-third of
the way, he passes the Panjabi Dhaba. At what time does he reach the
station?

Ans: 7:30 PM
Problem

If a seller gives 25% discount, he still earns 25% profit.If he now gives
10% discount, then what is the profit percentage he gains?
Problem
Let the Marked Price (MP) be ₹100.
Case 1:
Discount = 25% → Selling Price (SP) = 75% of MP = ₹75
Profit = 25% → Cost Price (CP) = (100/100+Profit%) X SP = (100/125) X 75 = 60
So, Cost Price is ₹60
Case 2:
Now the seller gives a 10% discount,
SP = 90% of MP = ₹ 90 & CP = ₹ 60 same as earlier

Profit = SP-CP = 90 - 60 = ₹ 30 And Profit %age is (30/60)X100 = 50 %


Problem

40% of the population of a village migrated to different cities in search


of jobs.10% of the remaining population died due to floods. The
present population is 1,08,000.What was the original population?
Problem

Let the original population be x.


40% migrated → Remaining = 60% of x = 0.6x
10% of this remaining died → Alive = 90% of 0.6x
= 0.9 X 0.6x = 0.54x
We are told this remaining population is 1,08,000
0.54x = 1,08,000
X = 200000
Problem

Four train tickets from city A to B and six tickets from city A to C cost
Rs. 190. Also, ten tickets from A to B and two tickets from A to C cost
Rs. 202. Find the fare of one train ticket to cities B and C respectively
from A.
Problem

Let the fare from:


A to B = ₹x
A to C = ₹y
4x+6y=190
10x+2y=202
Ans
A to B = ₹16
A to C = ₹21

You might also like