TCS NQT Questions From All Slots (Refresh This Every 5 Mins)
TCS NQT Questions From All Slots (Refresh This Every 5 Mins)
TCS NQT Questions From All Slots (Refresh This Every 5 Mins)
Important Information
1. Please do not download this PDF as we will keep on updating the same PDF once we get new
2. For discouraging malpractice, we will only add questions here. Once the previous slot has
completed.
5. Keep Refreshing (CTRL + R) this document every 5 mins for newer questions
6. Also share this PDF with your TPO's or placement cell of your college
Question 1- What is the sum ( in RS) which when divided among X Y Z in the
proportion 3:5:7 provides rupees 8000 more to Z then what it would have done to him
when the proportion is 11 : 15 : 19?
a. 180000
b. 120000
c. 175000
d. 135000
Answer 1:
X:Y:Z
3: 5: 7
Z got 8000 more = 2 parts more than Y
If 2 parts = 8000
Then 1 part = 4000
Final ratio = 11: 15: 19 = 45 parts
45 x 4000 = Rs 180000
a. 100
b. 1600
c. 11520000
d. 10
Answer 2: 10 (use the TCS calculator directly to find the answer of this question)
a. 1.5
b. 1.8
c. 1.2
d. 2.4
a. 80
b. 20
c. 40
d. 60
Answer 4: Efficiency of X = 4a
Efficiency of Y = a
Time taken by both to complete a work = 16 days
a = 20
Hence X will do the work in 20 days
And Y will do the work in 80 days
Thus Y will do half of work in 40 days
Note -
Efficiency and time taken are inversely proportional
So, if a = 20
So Y will do the task in 80 days and will complete half of the task in 40 days
a. 27
b. 81
c. 125
d. 25
Question 6- The collection of numbers which comprise the data given below is arranged
in ascending order.
(3,7,9, N - 1,15,18,19,20)
a. 10.5
b. 11.5
c. 11
d. 12
Answer 6: 11
Median of the even data = (sum of middle terms) / 2
= [(N - 1) + 15] / 2 = 12.5
a. 10
b. 0.01
c. 0.1
d. 1
Answer 7: 0.01%
0.025% of 240% of1.5 = 0.0009
0.01 % of 9 = 0.0009
Question 8 - After purchasing two copies of the same book, X sold them respectively at
0.8 and 1.4 times their cost prices. What was the percentage gain earned or loss incurred
by X?
a. 10% loss
b. 5% gain
c. 10% gain
d. 5% loss
Question 9: A file of cadets consisting of ten rows and five columns measures 420 m in
length along the direction of their marching. How much time (in hours and minutes)
would it take to march for a stretch of 3 km, if the stride of each cadet is 80 cm and he
takes 57 strides per minute?
a. 1 hr 10 min
b. 1 hr 20 min
c. 1 hr 24 min
d. 1 hr 15 min
Answer 9:
=>
= 75 min = 1 hr 15 min
Question 10: Two vessels X and Y of capacities one and two litres respectively are
completely filled with mixtures of two chemicals A and B.The ratio by volume of the
chemicals A and B in X and Y are 3:2 and 4:5 respectively.The contents of A and B are
mixed and the combination is kept in a vessel C of capacity of four litres.How many litres
of Chemical A should be added to the combination so as to make the ratio of A to B
equal to 1:1?
a.
b.
c.
d.
Answer 10:
In X
A:B
In Y
A:B
X Y
= 134 : 136
= 67 : 68
Question 11 -The diameter of a pizza is 30 cm.What is the area(in )of the upper
surface of a sector of the pizza whose arc length is 8 cm?
a. 120
b. 120
c. 60
d. 60
Question 12- In a competitive exam, 5 marks are awarded for every correct answer and
for every wrong answer, 2 marks are deducted. Sathwik scores 32 marks in the
examination. If 4 marks had been awarded for each correct answer and 1 mark had been
deducted for each incorrect answer, Sathwik would have scored 34 marks. If Sathwik
attempted all the questions, how many questions were there in the test ?
1. 14
2. 12
3. 20
4. 26
So,
5x -2y = 32
4x-2y =34----- *2
Now
5x-2y =32
8x-4y=68
By solving
3x=36
x=12
Question 13- An item was sold at a profit of 12% after giving a discount of 12.5% on the
list price. What would be the gain or loss percentage if a discount of 25% is given on the
list price ?
1. 2.5% gain
2. 2.5% loss
3. 4% loss
4. 4% gain
Answer 13:
Cp ------- > 100%
Sp -------- > 112% (12% profit)
But Sp is 12.5% of M.P => 12.5% discount
=> 87.5% of M.P = 112
=> list price = 128
25% discount on M.P = 25% of 128 = 32
=> 128 - 32 = 96 = S.P
C.P = 100 => SP = 96 => 4% loss
Question 14- The mean of a set of data is 5. What will be the mean if ten is subtracted
from each data ?
1. -5
2. 5
3. 10
4. -15
Answer 14: -5
let the number of data be n
so sum of data = mean * number of data
=5n
now 10 is subtracted to each data
so now sum becomes = 5n-10n =-5n
mean = sum of data /no. of data
=-5n/n = -5
so new mean becomes -5
Question 15- If (x+10)% of 240 is 60% more than x% of 180, then 15% of (x+20) is
what percent less than 25% of x ?
1. 15
2.
3. 16
4.
Answer 15:
(x + 10)% of 240 = x% of 180 + 60% of 180
if you solve this expression x value = 50
15% of x+20 is 10.5
25% of x is 12.5
so how much less = 2/12.5 * 100 = 16
Questions 16- What is the diameter (in cm) of a solid right circular cylinder whose
height is 6 cm and the area of the curved surface is five times the combined area of the
two flat surfaces
1. 2.4
2. 0.9
3. 1.2
4. 3
Answer 16: 1.2
Here h = 6 cm
C.S.A = 2 rh
2 rh = 5(2 )
2 x x r x 6 = 10 x x
12 x x r = 10 x x
12 = 10r
1.2 = r
Then diameter is 2.4
Questions 17- A sum invested on simple interest grows to Rs 22500/- and Rs 25500/- is
seven and nine years respectively. If you see this text know that this hardwork of
PrepInsta was stolen by another company. What is the rate percentage of the interest ?
1. 7.5
2. 9.6
3. 12.5
4. 13.5
1. 0.5
2. 5
3. 0.2
4. 2
Answer : Option 3
Solution :- ⅕= 0.2
Question 19 - The variation in temperatures throughout the day in a desert town was
studied on the basis of the record of minimum and maximum temperatures which were 8
and 36 degrees centigrade respectively. What was the standard deviation in degree
centigrade?
a. 12
b. 22
c. 14
d. 28
= 14
Question 20 - A sum of Rs. 30000 invested in a scheme where the interest gets
compounded annually and grows to Rs. 51840 in three years. How much interest in Rs.
would have got accrued in six months in the same scheme had the interest been
compounded quarterly?
a. 3075
b. 2975
c. 3024
d. 3126
Answer 20:
51840 = 30000 x
=>
=>
=>
Question 21- 96 men were engaged for a project of constructing a railway track of the
length of 18 km in four weeks. After one week it was observed that the work of 4 km was
completed. How many additional men should be engaged for timely completion of the
project?
a. 16
b. 14
c. 15
d. 12
Answer:
4 km was completed by 96 men
Remaining work is 14km in three weeks so per week 14/3
For 4km --------- 96men
For 14/3 km ----------- ?
= 14/3 x 96 x ¼ = 112 so additionally 16 men needed
Question 22- If n is an integer such that 1nn352 is a six-digit number exactly divided by
24, what will be the sum of the possible value of n?
a. 21
b. 27
c. 9
d. 15
Answer 22: 15
Possible values of n are 2, 5 and 8 so sum of all possible values is 2 + 5 + 8 = 15
Answer:
Step 1
Find the mean
8+9+12+15+16+20+24+30+32+34/10
=200/10
=20
8 12
9 11
12 8
15 5
10 4
20 0
24 4
30 10
32 12
34 14
12+11+8+5+4+0+4+10+12+14/10
80/10=8
Question 24 - The marks scored by a student out of 100 in English and Mathematics at
four consecutive monthly tests held in 2019 are presented through a Bar Graph shown
below. In each case the marks are a multiple of five.
In which month is the difference of marks scored in the two subjects the highest ?
1. Jan
2. Mar
3. Apr
4. Feb
Question 25-
● A
● D
● B
● C
Question 26: What is the mean proportional (MP) between the MPs of
A.
B.
C.
D.
Answer:
Verbal Ability
Question 1 - For the four sentences S1 to S4 paragraph below, sentences S1 and S4 are
given. From the options P Q and R, choose appropriate sentences for the following.
P: He says that today, machinery merely, If you see this text know that this hardwork of
PrepInsta was stolen by another company helps a few to ride on the back of millions.
Q: And adds that the spinning wheel is a machinery, a little toothpick is a machine.
R: He observes “How can I be against machinery when I know that even this body is a
most delicate piece of machinery”
a. QR
b. RQ
c. PQ
d. QP
Answer: Option B
RQ
Blank
2. A. largest
B. lowest
C.latest
D.loudest
Options:
a. C , B
b. D, C
c. B, A
d. A, D
Answer - B , A - Hazardous industries, and largest number of children.
Question 3: Read the passage given below and answer the questions
It used to be the American shopper that exemplified the state of the world economy. The
focus now should be on the person on the other side of the till. America's retail industry is
huge; it employees 15.9 million workers who represent one in nine American jobs. If you
see this text know that this hardwork of PrepInsta was stolen by another company. It is
also undergoing a wrenching change, as E-Commerce is into sales. There is no more
pressing test of society's ability to walk with technology's impact on work.
That impact is already visible. For all the benefits that online retailing brings to
consumers, it is causing immense pain to offline rivals. Last year 4000 American stores
closed; this year more than twice the number main shutter standard and poor's a rating
agency, expects retails defaults there to outnumber those in 2009. at the height of the
global recession. some formats-----discount stores groceries, high end mails----- will
continue to thrive. But many will shrink. The industry has shed 50,000 net jobs since
January. Department stores may need to close more than 800 stores to reach the
productivity levels of 2006. Many outlets are looking for ways to cut labour costs by
embracing automation
Question 4- Read the passage given below and answer the questions
It used to be the American shopper that exemplified the state of the world economy. The
focus now should be on the person on the other side of the till. America's retail industry is
huge; it employees 15.9 million workers who represent one in nine American jobs. It is
also undergoing a wrenching change, as E-Commerce is into sales. There is no more
pressing test of society's ability to walk with technology's impact on work.
That impact is already visible. For all the benefits that online retailing brings to
consumers, it is causing immense pain to offline rivals. Last year 4000 American stores
closed; this year more than twice the number main shutter standard and poor's a rating
agency, expects retails defaults there to outnumber those in 2009. at the height of the
global recession. some formats-----discount stores groceries, high end mails----- will
continue to thrive. But many will shrink. If you see this text know that this hardwork of
PrepInsta was stolen by another company. The industry has shed 50,000 net jobs since
January. Department stores may need to close more than 800 stores to reach the
productivity levels of 2006. Many outlets are looking for ways to cut labour costs by
embracing automation
a. Automation
b. Diversifying
c. Merging
d. Shutdown Business
Question 5- Read the passage given below and answer the questions
It used to be the American shopper that exemplified the state of the world economy. The
focus now should be on the person on the other side of the till. America's retail industry is
huge; it employees 15.9 million workers who represent one in nine American jobs. It is
also undergoing a wrenching change, as E-Commerce is into sales. There is no more
pressing test of society's ability to walk with technology's impact on work.
That impact is already visible. For all the benefits that online retailing brings to
consumers, it is causing immense pain to offline rivals. Last year 4000 American stores
closed; this year more than twice the number main shutter standard and poor's a rating
agency, expects retails defaults there to outnumber those in 2009. at the height of the
global recession. some formats-----discount stores groceries, high end mails----- will
continue to thrive. But many will shrink. The industry has shed 50,000 net jobs since
January. Department stores may need to close more than 800 stores to reach the
productivity levels of 2006. Many outlets are looking for ways to cut labour costs by
embracing automation
a. Grocery Stores
b. High end mails
c. Discount stores
d. Department Stores
Question 6- Read the passage given below and answer the questions
It used to be the American shopper that exemplified the state of the world economy. The
focus now should be on the person on the other side of the till. America's retail industry is
huge; it employees 15.9 million workers who represent one in nine American jobs. It is
also undergoing a wrenching change, as E-Commerce is into sales. There is no more
pressing test of society's ability to walk with technology's impact on work.
That impact is already visible. For all the benefits that online retailing brings to
consumers, it is causing immense pain to offline rivals. Last year 4000 American stores
closed; this year more than twice the number main shutter standard and poor's a rating
agency, expects retails defaults there to outnumber those in 2009. at the height of the
global recession. some formats-----discount stores groceries, high end mails----- will
continue to thrive. But many will shrink. The industry has shed 50,000 net jobs since
January. Department stores may need to close more than 800 stores to reach the
productivity levels of 2006. Many outlets are looking for ways to cut labour costs by
embracing automation
Why does the writer consider it important to discuss the plight of those on the other
side of the till
a. they need to be trained to deal with pandemic related protocols
b. they have to take greater safety precautions at the workplace
c. they know they now have less work to do but are great getting paid well
d. there are a very large group of workers whose jobs are threatened
Answer: Option D
there are a very large group of workers whose jobs are threatened
Question 7: One the part of the sentence below may contain an error identify the part if
there is no error choose “No error”
The state government has proposed to put on place the new portal to promote
transparency and simplification
Answer - B
Put in place will be the right preposition.
Question 8 : Read the passage given below and answer the questions
Twinkling lights are just visible behind screens where staff are putting the finishing
touches of this year's Christmas displays, but in other parts of the shop, the lights are still
off. John lewis, flagship store in Oxford Street, Central London, If you see this text know
that this hardwork of PrepInsta was stolen by another company. is bearing the scars of the
pandemic.
A restaurant and cafe are closed as there is more stuff than customers on the furnishings
floors. The fashion floor is also a depressing sight, with tags flagging big discounts on
racks of unwanted dresses and office wear. Last week it emerged that, John Lewis had
applied for planning permission to convert entire floors of the shop into office space, it's
not hard to see why ,
John Lewis, with its employee ownership and reputation for stealing customer service,
still holds a special place in shoppers’ hearts. But while sister chain Waitrose along with
other supermarkets, has thrived in the pandemic results published last week show the
department store chain is in trouble.
Huge changes in shopper behaviour, which have been accelerated by coronavirus mean
the John Lewis website is now responsible for 60% of the chain sales ------- up from 30
% pre-covid. This tilt towards the web means the department stores, as properties, and
now deemed to be worth nearly Euro 500Mn and less than before ------ a reassessment in
last week's results that sent the group crashing Euro 635 Mn into the red in the first half
of its financial year.
Answer - B
putting finishing touches to festival decorations is not a scar of the pandemic as
stated in the first line of passage.
Question 9 : Which of the following sentences does NOT use informal language?
Question: 10- One part of the sentence below may contain an error. Identify the part. If
there is no error, choose ‘No Error’
Everyday life have become more complicated with the advancement in mobile
technology.
Answer - D
This sentence combines all the elements of the 3 sentences with a proper use of
conjunction and tenses.
Question 12 : Henry looks carefully into the telescope which lets him see far, far away,
as far as the distant nebulae on the far edges of the Milky Way. Henry is an . He
looks at the sky and stars in particular. Even though he spends much of his time looking
at detailed computer reports, which are just lists and lists of numbers. His thing
about his job is looking through the telescope. And today he is very excited. He isn’t sure
yet, but he thinks he has seen a dense cloud which might be the beginning of a new star.
a. D,B
b. C,D
c. A,A
d. B,C
Answer - B ( C , D)
Henry is an astronomer (who studies the stars and planets) and his favourite thing is to
look at the sky.
Question 13: Fill in the blanks with the most appropriate set of words from the options
given below.
Answer - D
Question 14: You are going to read a text about an artist. Some sentences are missing
from the text. Choose from the list. (A-C) the most appropriate sentence for each gap
(1-2) in the text. There is one extra sentence that you do not need to use.
Kahini held her first solo show in 1998, the entire proceeds of which went to the Helen
Keller institute for the Deaf and Blind in Mumbai. Encountering the pathless
terrain of inner landscape, the artist engages in a restless re-examination of idea and
image. She has also taken part in several art camps.
A. In her fifth solo show with acrylic and oil-on-canvas paintings in the series titled
‘Metamorphosis’ held recently at the Mumbai’s Jehangir Art Gallery. She showed
for the first time her abstract work as well.
B. Her work has been acquired by corporate houses and also forms part of private
collections.
C. She has participated in a group show along with 50 women artists to celebrate
International Women’s Day
a. A , C
b. C , B
c. A, B
d. B , A
Answer: B, A
Question 15: Aisha had been very successful managing her team in Edinburgh and was
asked by the company to lead a remote team for an important two- year project. Keen to
demonstrate her leadership abilities to the head office. Aisha got her team members
together for a remote meeting. If you see this text know that this hardwork of PrepInsta
was stolen by another company. But right from that first meeting , she realized that this
was going to be a different challenge.
1. Lucia kept asking about really specific details while Aisha was hoping
to use the meeting to get to know the team members and identify priorities. Archies
and Lucia kept accidentally talking at the same time, and when they didn’t speak,
there was an uncomfortable silence. Valentina hardly said a word.
Without these visual clues, Aisha had no idea whether
people were interested, lost, confused or bored.
A. No one had their cameras on, so there was none of the usual communication
through body language and facial expressions.
B. Compared to a face-to-face meeting the remote team is not preferred by all the
managers
C. For a start, Archie was late for the meeting by about 15 minutes because of the
‘technical problems’.
a. A , C
b. B , A
c. A , B
d. C , A
Answer - C, A
C starts with (for a start) hence this will be the beginning.
A talks about lack of visual clues which satisfies the sentence following the blank.
a. Broken out
b. Broken off
c. Broken up
d. Broke away
Answer: Option C
Broken Up
Question: 17- The lady purse was lost lodged a complaint at the police
station
a. Whom
b. Who
c. Whose
d. Which
Question: 18- One part of the sentence below may contain errors.
Identify the part if there is no error choose “No error”.
The board announced that the decision to reduce the syllabus is yet to be approved by the
competent authority.
a. No error
b. the decision to reduce the syllabus
c. The board announced that
d. is yet to be approved by the competent authority.
Question 19- For the four sentences (S1 to S4) paragraph below, sentences S1 and S4
are given. From the P, Q, R, choose the correct sequence.
S1- Once upon a time an ambassador came to see the king of Sparta on some official
business.
S2-
S3-
S4 - But he found Nothing of the kind.
P - The ambassador knew that the king of Sparta was also really the ruler of the entire
Greece and so he expected to see the massive ………………………………
Q - You are looking at the walls - ten thousand men and every man is a brick
R- After their work was over the King took his visitor on a sightseeing tour of the capital
city.
a. RP
b. RQ
c. PQ
d. QP
Answer: Option a.
RP
Question: 20- For the four sentences (S1 to S4) paragraph below, sentences S1 and
S4 are given. From the P, Q, R, choose the correct sequence.
S1 - The question has often been asked why the Wright Brothers were able to succeed in
an effort in which so many others had failed.
S4 - Both men worked well together, read the same books, located and shared
information, talked incessantly about the possibility of manned flight, and served as a
consistent source of inspiration and encouragement to each other. If you see this text
know that this hardwork of PrepInsta was stolen by another company
a. PR
b. QP
c. RQ
d. PQ
Answer: QP
Question: 21- You are going to read a text about a man in a photograph. Some
sentences are missing out from the text. Choose from the list (A to C) the most
appropriate sentence for each gap (1-2)in the text. There is one extra sentence that
you do not need to use
It was the first photograph that I had ever seen, and it fascinated me. I still remember
holding it at every angle in order to catch the flickering light from the (1)
I never met him but I felt that I knew him. (2) I moved the photograph so the
shadow lay perfectly around his hollow cheeks. How differently his chin looks.
a. The man in the photograph was Unsmiling but his eyes were kind.
b. I would tell him how wonderful he looked with the the shadow that I had seen
across his photograph, and I would most carefully suggests that he grew with
c. One evening when I was looking at the photograph, as I always did before I went
to sleep, I noticed a shadow across the man's thin face.
A. 1- C 2- A
B. 1- C 2- B
C. 1- B 2- A
D. 1- A 2- C
Logical Ability
Question 1: In the following diagram, the triangle stands for “males”, the circle stands for “doctors”,,
the rectangle stands for “government employed”, the hexagon stands for “corona warriors”. If you see
this text know that this hardwork of PrepInsta was stolen by another company. The numbers in different
segments show the number of persons for that segment.
How many government-employed doctors are corona warriors but are not males?
A. 14
B. 23
C. 16
D. 17
Solution:
Question 2: In the following diagram, the rectangle stands for tennis fans, the circle stands for athletes,
and the triangle stands for students, and the square stands for hockey players. The numbers in different
segments show the number of persons.
How many athletes playing hockey are either students or tennis fans but not both
A. 18
B. 15
C. 14
D. 3
Solution:
Questions 3: In a certain code A%B means A is the brother of B, A&B means A is the mother of B,
A@B means A is the daughter of B, A$B means A is the father of B, A#B means A is the sister of B.
A. Sister
B. Brother
C. Husband
D. Wife
Questions 4: Four friends A, B, C, and D have one of the four professions i.e., Doctor, architect,
engineer, and lawyer. Each friend belongs to one of the four different cities, Chandigarh, Indore,
Lucknow, and Pune. A is not a lawyer or engineer. The doctor is from Lucknow, D is an architect. The
lawyer is from Pune. Well this was original creation of PrepInsta and was stolen. The engineer is neither
from Chandigarh nor Pune. D is not from Pune. C is from Indore. Which of the following statement is
correct about B?
Solution:
● A is not a lawyer or engineer
● The doctor is from Lucknow
● D is an architect
● The lawyer is from Pune
● The engineer is neither from Chandigarh nor Pune
● D is not from Pune
● C is from Indore
Question 5:The number of employees working in six different departments in two companies A and B
are given below.Study the given data and answer the questions that follow.
Company A
Departement No of Employees
Marketing 256
HR 72
Production 504
Accounts 68
Operations 256
Planning 46
Total 1202
Company B
Departement No of Employees
Marketing 524
HR 108
Production 736
Accounts 122
Operations 146
Planning 58
Total 1694
What is the percentage difference between the employees working in the production department of
company A and B.
a. 3.21%
b. 2.27%
c. 1.52%
d. 1.15%
Solution:
Question 6 -If both company A and B merge together to form company C,then what is the percentage
of marketing and accounting employees in total employees of company C?
a. 33.49%
b. 37.59
a. Broken out
b. Broken off
c. Broken up
d. Broken away
Answer:
Question 8 :A statement is followed by two assumptions numbered I and II.Consider the statement and
decide which of the given assumption(s) is/are implicit in the statement.
Statement-
Various government accross the world have issued strict guidelines for the public to wear masks and
wash hands regularly to safeguard their health during covid-19 pandemic.
Assumptions-
I. Covid-19 Pandemic is serious health issue.
II. There are ways by which people can save themselves from Covid-19 pandemic.
Options-
a. Neither I nor II is implicit
b. Both I and II are implicit
c. Only II is implicit
d. Only I is implicit
a.OYC
b.JTX
C.FPT
d.UFI
Question 10 :- In a certain code , K*N means K is the brother of N , K+N means K is the husband of N,
K x N means K is the mother of N and K ÷ N means K is the sister of N , then which of the following
expressions means C is the daughter of Y.?
a. Y+RxC*H÷V
b. Y + R x H ÷ C *V
c. Y+RxH*C÷V
d. YxR+H*C÷V
Solution:-
Question 11:- Given below is a question followed by two statements , I and II, each containing some
information. Decide which of the statement(s) is/ are sufficient to answer the question.
How is A related to C?
Statements:-
a. A is the wife of B and B is the brother of C.
b. C is the son of D
Question 12 :- Four Statements are followed by four conclusion numbered conclusions(s) logically
follows/follow from the statements.
Statements.
A. All vegetables are fruit.
B. No Carrot is fruit.
C. Some roots are carrot
D. All roots are eatables
Conclusion
Question 2-
class Main
{
public static void main(String args[])
{
int i,j,x=0;
for(i=0;i<5;i++)
for (j=0;j<5;j++){
x=(i+j-1);
System.out.print(x);
break;
}
System.out.print(x);
}
}
What will be printed when the above sample code is executed.
Enter your answer ONLY as a NUMERAL, in the box.
Answer- -101233
Question 3- Which of the following options best suits for ‘Memory Leak Occurred’
1. Resource allocation pending while debugging the code
2. Program releases resources allocated in the memory
3. Program does not free the memory which is allocated dynamically
4. Occurs due to address assignment failure.
Answer- Program does not free the memory which is allocated dynamically.
Question 6- Given here is a scenario. Consider the graph algorithm and answer the given
question.
John wants to go to different locations of the city in which he is. He has listed all of them down.
However he wants to visit one location before visiting some other location. What application of
graphs can he use to determine that location?
1. DFS
2. Dijsktra’s
3. BFS
4. Topological Sorting
Answer- Dijkstra’s
Question 7 - Find Prefix and Postfix for the below Infix problem statement:
1. Prefix Expression: 11 20 5 20 15 - 6 5 ^^ * / +
Postfix Expression: + 11 / 20 * 5 ^^ - 20 15 6 5
2. Prefix Expression: + 11 / 20 * 5 ^^ - 20 15 6 5
Postfix Expression: 11 20 5 20 15 - 6 5 ^^ * / +
3. Prefix Expression: 11 20 15 20 5 - ^^ * 6 5 / +
Postfix Expression: + 20 / 11 * 5 - 20 ^^ 15 6 5
4. Prefix Expression: 11 20 5 20 15 - ^^ * / + 6 5
Postfix Expression: + 11 / ^^ - 20 * 5 20 15 6 5
Question 8 - There are two integer numbers X and Y, and the value of X and Y is in between 0
to 25. User stores the value under 5 bit number. How many minimum bit is required to store
the result of the below expression?
Res = 3*(X-Y)
1. 7
2. 5
3. 8
4. 6
Answer-
Question 9- Write the name of library of functions which is used to perform arithmetic
operations on BigInteger and BigDecimal
Answer- MathContext
This question in TCS NQT was wrong. Incorrect options were given ….
Question 10 - Consider the following tree what will be the preorder traversal.
1. ABCDEFGHI
2. DHEBIFGCA
3. HIDEFGBCA
4. DHEBAFIGC
Answer- ABDEHCFIG
Coding
Coding Question 1 (Slot - 1)
There is a JAR full of candies for sale at a mall counter. JAR has the capacity N,
that is JAR can contain maximum N candies when JAR is full. At any point of time.
JAR can have M number of Candies where M<=N. Candies are served to the
customers. JAR is never remain empty as when last k candies are left. JAR if
refilled with new candies in such a way that JAR get full.
Write a code to implement above scenario. Display JAR at counter with available
number of candies. Input should be the number of candies one customer can order
at point of time. Update the JAR after each purchase and display JAR at Counter.
Output should give number of Candies sold and updated number of Candies in
JAR.
If Input is more than candies in JAR, return: “INVALID INPUT”
Given,
N=10, where N is NUMBER OF CANDIES AVAILABLE
K =< 5, where k is number of minimum candies that must be inside JAR ever.
Solution in C
#include <stdio.h>
int main()
{
int n=10, k=5;
int num;
scanf("%d",&num);
if(num>=1 && num<=5)
{
printf("NUMBER OF CANDIES SOLD : %d\n",num);
printf("NUMBER OF CANDIES LEFT : %d",n-num);
}
else
{
printf("INVALID INPUT\n");
printf("NUMBER OF CANDIES LEFT : %d",n);
}
return 0;
}
Solution in C++
#include <iostream>
using namespace std;
int main()
{
int n=10, k=5;
int num;
cin>>num;
if(num>=1 && num<=5)
{
cout<<"NUMBER OF CANDIES SOLD : "<<num<<"\n";
cout<<"NUMBER OF CANDIES LEFT : "<<n-num;
}
else
{
cout<<"INVALID INPUT\n";
cout<<"NUMBER OF CANDIES LEFT : "<<n;
}
return 0;
}
Solution in Java
import java.util.Scanner;
class Main{
public static void main(String[] args) {
int n = 10, k = 5;
int num;
Scanner sc = new Scanner(System.in);
num = sc.nextInt();
if(num >= 1 && num <= 5) {
System.out.println("NUMBER OF CANDIES SOLD : " + num);
System.out.print("NUMBER OF CANDIES LEFT : " + (n - num));
} else {
System.out.println("INVALID INPUT");
System.out.print("NUMBER OF CANDIES LEFT : " + n);
}
}
}
Coding Question 2 (Slot - 1)
Selection of MPCS exams include a fitness test which is conducted on ground. There
will be a batch of 3 trainees, appearing for running test in track for 3 rounds.
You need to record their oxygen level after every round. After trainee are finished
with all rounds, calculate for each trainee his average oxygen level over the 3 rounds
and select one with highest oxygen level as the most fit trainee. If more than one
trainee attains the same highest average level, they all need to be selected.
Display the most fit trainee (or trainees) and the highest average oxygen level.
Note:
1. The oxygen value entered should not be accepted if it is not in the range
between 1 and 100.
2. If the calculated maximum average oxygen value of trainees is below 70 then
declare the trainees as unfit with meaningful message as “All trainees are
unfit”
3. Average Oxygen Values should be rounded.
Example 1:
INPUT VALUES
95
92
95
92
90
92
90
92
90
OUTPUT VALUES
Trainee Number : 1
Trainee Number : 3
Note:
Input should be 9 integer values representing oxygen levels entered in order as
Round 1
Oxygen value of trainee 1
Oxygen value of trainee 2
Oxygen value of trainee 3
Round 2
Oxygen value of trainee 1
Oxygen value of trainee 2
Oxygen value of trainee 3
Round 3
Oxygen value of trainee 1
Oxygen value of trainee 2
Oxygen value of trainee 3
Output must be in given format as in above example. For any wrong input final
output should display “INVALID INPUT”
Solution in C
#include <stdio.h>
int main()
{
int trainee[3][3];
int average[3] = {0};
int i, j, max=0;
for(i=0; i<3; i++)
{
for(j=0; j<3; j++)
{
scanf("%d", &trainee[i][j]);
if(trainee[i][j]<1 || trainee[i][j]>100)
{
trainee[i][j] = 0;
}
}
}
for(i=0; i<3; i++)
{
for(j=0; j<3; j++)
{
average[i] = average[i] + trainee[j][i];
}
average[i] = average[i] / 3;
}
for(i=0; i<3; i++)
{
if(average[i]>max)
{
max = average[i];
}
}
for(i=0; i<3; i++)
{
if(average[i]==max)
{
printf("Trainee Number : %d\n",i+1);
}
if(average[i]<=70)
{
printf("Trainee is Unfit");
}
}
return 0;
}
Solution in C++:
#include <iostream>
using namespace std;
int main()
{
int trainee[3][3];
int average[3] = {0};
int i, j, max=0;
for(i=0; i<3; i++)
{
for(j=0; j<3; j++)
{
cin>>trainee[i][j];
if(trainee[i][j]<1 || trainee[i][j]>100)
{
trainee[i][j] = 0;
}
}
}
for(i=0; i<3; i++)
{
for(j=0; j<3; j++)
{
average[i] = average[i] + trainee[j][i];
}
average[i] = average[i] / 3;
}
for(i=0; i<3; i++)
{
if(average[i]>max)
{
max = average[i];
}
}
for(i=0; i<3; i++)
{
if(average[i]==max)
{
cout<<"Trainee Number : "<<i+1<<"\n";
}
if(average[i]<=70)
{
cout<<"Trainee is Unfit";
}
}
return 0;
}
Solution in Java:
import java.util.Scanner;
class Main {
public static void main(String[] args) {
int[][] trainee = new int[3][3];
int[] average = new int[3];
int max = 0;
Scanner sc = new Scanner(System.in);
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 3; j++) {
trainee[i][j] = sc.nextInt();
if(trainee[i][j] < 1 || trainee[i][j] > 100) {
trainee[i][j] = 0;
}
}
}
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 3; j++) {
average[i] = average[i] + trainee[j][i];
}
average[i] = average[i] / 3;
}
for(int i = 0; i < 3; i++) {
if(average[i] > max) {
max = average[i];
}
}
for(int i = 0; i < 3; i++) {
if(average[i] == max) {
System.out.println("Trainee Number : " + (i +
1));
}
if(average[i] <= 70) {
System.out.print("Trainee is Unfit");
}
}
}
Numerical Ability
Will be added soon
Verbal Ability
Will be added soon
Logical Ability
Will be added soon
Programming Logic
Will be added soon
Coding
Will be added soon