Legato Technologies Assessment 1: Test Summary
Legato Technologies Assessment 1: Test Summary
Test Summary
No. of Sections: 6
No. of Questions: 82
Total Duration: 130 min
Section Summary
No. of Questions: 15
Duration: 20 min
Additional Instructions:
None
Q1. Two persons are going together. One of them remarked to the other. “Though you are my father, yet I am not your son.” what is the
relationship between the two?
Q2. Pointing towards a man in a photograph, Aruna said, “He is the son of the only son of the father of the brother of my sister.” How is
that man related to Aruna?
Niece
Cousin
Son
None of these
Q3. In a secret way of writing, INDIA HAS WON FIRST GOLD MEDAL is written as JFZJU OUV SEF PJDVB REQZ ITZUQ. Bearing the
method In mind, pick up the code from the answer choices for each given word.
LIGHT
QJROB
KHIGS
CIMKN
KJHGS
Q4. In a secret way of writing, INDIA HAS WON FIRST GOLD MEDAL is written as JFZJU OUV SEF PJDVB REQZ ITZUQ. Bearing the
method In mind, pick up the code from the answer choices for each given word.
CLUSTER
WQAVBTD
BKTUSDQ
BITSVEO
XFJNOPQ
(D, O)
(D, H)
(D, K)
(D, G)
Q7. In each of the following questions one term is missing as shown by a (?). The term to fill in the blank is given as one of the
alternatives among the four given after each question.
4, 7, 12, ?, 28, 39
19
24
14
16
17
14
21
Q9. There is a safe with a 5 digit number as the key. The 4th digit is 4 greater than the second digit, while the 3rd digit is 3 less than the
2nd digit. The 1st digit is thrice the last digit. There are 3 pairs whose sum is 11.Find the number.
65292
35871
65832
35869
Q10. In the following number series how many 7’s are there which are preceded by 6 but not followed by 5?
3457892167543157684251764376
None of these
Q11. Six friends are sitting in a circle and are facing the centre of the circle. Deepa is between Prakash and Pankaj. Priti is between
Mukesh and Lalit. Prakash and Mukesh are opposite to each other. If Prakash and Priti interchanges their place, who will be sitting
to the third left of Mukesh?
Deepa
Lalit
Prakash
Priti
Q12. Six friends are sitting in a circle and are facing the centre of the circle. Deepa is between Prakash and Pankaj. Priti is between
Mukesh and Lalit. Prakash and Mukesh are opposite to each other. Who are the neighbours of Mukesh ?
Q13. Each of the following series consists of seven figures, two of which at the ends are unnumbered. One of the numbered figure does
not fit into the series. Find out the figure.
Q14. In the following questions the first and last blocks mark the beginning and the end of a series respectively. The numbered blocks
are a part of the series. However, one of these numbered blocks violates the pattern. Find the odd block and mark your answer
accordingly.
Q15. In the following questions the first and the last blocks mark the beginning and the end of a series respectively. The numbered
blocks are a part of the series. However, one of these numbered blocks violates the pattern. Find the odd block and mark your
answer from 1-5 accordingly.
5
Section 2 - Quantitative Aptitude
Section Summary
No. of Questions: 15
Duration: 20 min
Additional Instructions:
None
Q1. 10 men and 12 children complete a certain piece of work in 10 days. Each child takes thrice the time taken by a man to complete
the work. The time taken by 12 men to finish the same work is
11.66 days
10 days
10.33 days
12.16 days
Q2. 5 men and 8 women can do a job in 8 days, while 4 men and 6 women can do it in 10 days. How many days will 10 men take to
finish the job?
10 days
8 days
6 days
None of these
Q3. Anita goes to school at 15 km/h and she is late by 4 minutes. The next time she goes to school at 20 km/h and she reaches school
a minute early. What is the distance to her school?
3 km
5 km
4 km
6 km
Q4. A thief stole a cycle and rides at 10 km per hour. After 2(1/2) hours a police man chased him at 30 km/hr. At what distance he will
catch him?
35.5 km
30 km
37.5 km
39 km
Q5. How many different straight lines can be formed by joining 12 different points on a plane of which four are collinear and the rest
are non collinear?
16
32
61
64
Q6. Find the number of words of 5 letters such that each can be formed with the letters of the words “CHROMATE”. (These words need
not have meaning) if each letter may be repeated in any arrangement.
262144
4096
1024
32768
Q7. The chance for A to solve a problem is 50%, B to solve a problem is 60% and C to solve a problem is 80%. What is the probability
that the problem is solved once all the three try?
0.96
0.568
0.665
0.75
Q8. The probability that A can solve the problem is 2/3 and B can solve it is 3/4. If both of them attempt
the problem, then what is the probability that the problem gets solved.
11/12
12/15
13/16
10/13
Q9. The L.C.M and H.C.F of two positive numbers are 175 and 5 respectively. If sum of the numbers is 60, what is the difference
between them?
10
15
20
Q10. The LCM of two numbers is 192 and their HCF is 8. If one of the numbers is 64, then what is the other number?
35
24
28
30
Q11. Apple costs L rupees per kilogram for first 30kgs and Q rupees per kilogram for each additional kilogram. If the price of 33
kilograms is 11.67and for 36kgs of Apples is 12.48 then the cost of first 10 kgs of Apples is
3.62
10.53
1.17
2.8
Q12. The cost of 10 kg of apples is equal to the cost of 24 kg of rice. The cost of 6 kg of flour equals the cost of 2 kg of rice. The cost of
each kg of flour is Rs.20.50. Find the total cost of 4 kg of apples, 3 kg of rice and 5 kg of flour?
Rs.849.40
Rs.877.40
Rs.901.60
Rs.815.20
Q13.
A school has 30% students from Rajasthan. Out of these, 20% are Jaipur students. Find the total percentage of students from
Jaipur?
9%
10%
4%
6%
Q14. On a certain island, 5% of the 10000 inhabitants are one legged and half of the others go barefooted. What is the least number of
Shoes needed in the island?
15000
10000
12500
9400
Q15. 1 kg of tea and 4 kg of sugar cost Rs.88.20, but if sugar rose 50 percent and tea 10 percent, these would cost Rs.114.30. Find the
price per kg of sugar:
Rs 10.8
Rs 45
Rs 15
Rs 11.25
Section Summary
No. of Questions: 15
Duration: 15 min
Additional Instructions:
None
Q1. Read each question and answer the question given below each accordingly.
Guillemots are birds of Arctic regions. They feed on fish that gather beneath thin sheets of floating ice, and they nest on nearby
land. Guillemots need 80 consecutive snow-free days in a year to raise their chicks, so until average temperatures in the Arctic
began to rise recently, the guillemots’ range was limited to the southernmost Arctic coast. Therefore, if the warming continues, the
guillemots’ range will probably be enlarged by being extended northward along the coast.
What of the following, if true, most seriously weakens the argument?
Even if the warming trend continues, there will still be years in which
guillemot chicks are killed by an unusually early snow.
If the Arctic warming continues, much of the thin ice in the southern Arctic
will disappear.
Q2. Read each question and answer the question given below each accordingly.
Some economists view the Kennedy-Johnson tax cut of 1964, which radically reduced corporate and individual taxes, as the
impetus for the substantial prosperity enjoyed by the United States in the late 1960’s and early 1970’s.
Which of the following, if true, would most weaken the claim that the tax cut of 1964 was the impetus for economic prosperity?
Modernized, more productive factories were built in the late 1960’s as a result
of funds made
available by the tax cut.
The tax cut of 1964 contained regulations concerning tax shelters that
prompted investors to transfer their savings to more economically productive
investments.
undulating
crooked
wavy
transparent
delicate
Q4. Choose the word that is most nearly opposite in meaning to the given words.
Ethereal
earthly
barren
affectionate
perpetual
(a) Due to the press strike/ (b) no news have been received/ (c) of the political development in Delhi /(d) till date. / (e) No error.
(A)The managing committee has / (B) invited applications for the post of / (C) teachers because there are five teachers / (D) fewer
than the requirement / (E) No error.
Q7. Each of the following questions has a paragraph from which the last sentence has been deleted. From the given options, choose
the one that completes the paragraph in the most appropriate way.
The wandering gypsies of Europe are finally trying to organize themselves. The European Commission has sponsored a gathering
of the gypsies to help them decide how to improve their lot without destroying their culture. Not since the Nazi campaign of
genocide have they faced such a wave of violence and xenophobia as now. The wandering nature of the gypsies is both the
hallmark of their culture and the trait that leads to conflict with structured societies. Their roaming makes it difficult for national or
local governments to educate the gypsies, tax them, or even count them. (……)
The gypsies, who began their westward exodus from India in the tenth
century and who call themselves Roms, refuse to be sedentary and be taxed.
Q8. A number of sentences are given below which, when properly sequenced, form a coherent paragraph. Each sentence is labelled
with a letter. Choose the most logical order of sentences from among the four given choices to construct a coherent paragraph.
A. An age such as ours which resents such disturbance is unlikely to view with sympathy the aims of science.
B. From Galileo to Darwin, from Einstein to Freud, scientific theories have constantly rejocated our place in the order of things.
C. No period has been more penetrated by science, not more dependent upon it, than the past half century.
D. Few things - physical, social or moral - have more disturbed our universe than has science.
E. Yet, no period has been more uneasy about it, nor felt more that the relationship with scientific knowledge is a Faustrian pact.
DBACE
CBDAE
DACEB
BACED
Q9. A number of sentences are given below which, when properly sequenced, form a coherent paragraph. Each sentence is labelled
with a letter. Choose the most logical order of sentences from among the four given choices to construct a coherent paragraph.
DCEAB
EABCD
BCDAE
CDEAB
since
because
as
by
Similarly
In addition
Any how
For instance
When the man asked me how I had got ____ address, I told him that I was given it by a relative of ______.
my / me
his / his
mine / his
his / him
him / him
People can often go years without seeing friends and then suddenly decide to visit quite __________, particularly after a major event
changes their lives.
fashionably
frequently
sadly
manipulatively
flippantly
Q14. Select the one which gives the meaning of the underlined idiom.
by underhand means
by honest means
by intelligent means
Q15. Find the Relationship between the given pairs and match them with the right pair.
KANGAROO : JOEY ::
lion : pride
goose : gosling
bevy : beauties
foal : horse
Section Summary
No. of Questions: 15
Duration: 20 min
Additional Instructions:
None
Common Content:
The following pie-chart shows the sales of coffee in a particular country X over the years 1992 to 1996. There are two types of coffee;
Grade A and Grade B. The price for grade A coffee was Rs.50/kg and for grade B was Rs.100/kg. The pie-chart shows the combined sales
for grade A and grade B types of coffee.
In each of the given years, sales was 80% of the total production in that particular year.
Q1. If the sales (kg) of coffee of grade A and grade B in 1992 was in the ratio of 7 : 3, then what was the
average price per kg of coffee sold in 1992?
Rs.60
Rs.65
Rs.70
Rs.75
1000
2000
3000
4000
Q3. The average annual percentage growth rate of the production of coffee from 1992 - 96 was
100%
200%
300%
0%
Q4. The average price of grade B coffee for the given five years exceeded the average price for grade A for
the same period by
100%
200%
50%
25%
Q5. If 10000 MT (metric tons) of grade A coffee was sold in the year 1996, then what was the sales of
grade B coffee in the same year (in MT)? (Assume only two types).
7000
5000
4000
8000
Common Content:
The following table shows the percentage selection of the students claimed by two major postal training institutes A & B. The pie-chart
shows zone wise distribution, Refer to the pie chart and the table to answer the questions that follow.
Q6. How many selected students of North Zone took postal course offered by Institute A (approx.)?
252
272
302
182
Q7. The average number of selected students from all the zones who had done the course offered by
Institute A (approx.) is
140
160
200
220
Q8. The maximum number of selected students took the postal course offered by Institute B from the
zone.
Central
West
South
North
Q9. What was the total number of students from South Zone and North-East Zone who had taken postal
courses either from A or from B (approx.)?
330
560
700
850
Q10. What was the total selections from North, Central and South Zones?
1651
1701
1122
1356
Common Content:
Study the graph carefully and answer the questions given below it
Q11. In which year was the ratio of Gross Profit (GP) to Net Profit (NP) equal to 2?
1986
1987
1988
1989
1987
1988
1989
1990
Q13. In which year did GP register maximum growth over the previous year?
1986
1987
1988
1989
Q14. For how many years was there a paired rise in GP and NP?
Q15. The ratio of the largest difference between the GP and NP for a particular year to the smallest
difference between them for a particular year is
>2
<1
Section Summary
No. of Questions: 20
Duration: 25 min
Additional Instructions:
None
12
20
18
No Output
Yes
No
short int
Undefined behaviour
hi hi hi 0 0 0
0 hi hi hi 0 0 0
000
10
Undefined behaviour
10
Undefined behaviour
10,10
10,11
11,10
11,11
Q12. Preprocessor feature that supply line numbers and filenames to compiler is called?
Selective inclusion
macro substitution
Concatenation
Line control
Q13. Can we use a function as a parameter of another function? [ Eg: void wow(int func()) ]
Yes, but we call the function again to get the value, not as convenient as in
using variable
From the point of declaration to the end of the file in which it is defined
From the point of declaration to the end of the file being compiled
From the point of declaration to the end of the file in which it is defined
From the point of declaration to the end of the file being compiled
func(a);
func(&a);
func(*a);
func(**a);
Q19. Which of the given option is the correct method for initialization?
typedef char *string;
*string *p = “Hello”;
string p = “Hello”;
*string p = ‘A’;
Not more than one space should be given when using typedef
screen
standard output
Section 6 - Programming
Section Summary
No. of Questions: 2
Duration: 30 min
Additional Instructions:
None
Q1. Naren wants to play a number game with his friends. He will give a set of numbers and select one number from it. His friends have
to say the number of elements greater than and smaller than that particular element and find how many elements exactly divides
the selected element.
Write a program to get integer inputs in an array and select an element from the input and count the
Input Format
The first line of the output consists of the number of elements greater than the particular element.
The second line consists of the number of elements lesser than the particular element.
The third line of the output consists of the number of elements that exactly divides the selected element.
Constraints
10
Greater : 1
12 18 98 72 42 6 3 9 10 11
Lesser : 8
72 Exactly divides : 5
Q2. Given a string (array of character), split the string to half and reverse each half.
Input Format
Output Format
Constraints
placementseasoncoimbatore aestnemecalpserotabmiocno
Solution
Ans:[c]
As the first person is the father of second person, and the second person is not the son of first person, then second person must be
Q2
None of these
Solution
Father
|
Son
Q3
QJROB
Solution
Q4
WQAVBTD
Solution
So the code for cluster will be _Q_VBTD. The only option that matches this is 1.
Q5
L
Solution
BP= 2+16= 18
KG= 11+7= 18
HJ= 8+10= 18
FL= 6+12= 18
Q6
(D, H)
Solution
The first letter starts with B and it continues so the first letter should be D
Q7
19
Solution
The difference between successive terms of the series is: 3, 5, 7, 9, 11. Therefore, the missing number will be 19.
Q8
21
Solution
In each series, 5 is added to the previous number to get the next number
So 16 + 5 = 21
Q9
65292
Solution
a=y+4
Assume that z+a is one of the pairs whose sum is 11. y-3+y+4=11 2y+1=11 2y=10 y=5 z=2 a=9
Assume that x+y is one of the pairs whose sum is 11. 3b+5=11 3b=6 b=2 x=6 x=6 y=5 z=2 a=9 b=2
Apply the given rules to each of the options and see which match.
Option 1: 65292
Q10
None of these
Solution
Q11
Priti
Solution
Q12
Priti and Pankaj
Solution
Q13
3
Solution
In one step, the symbols at the opposite corner interchange positions. In the next step, the symbols at the opposite corners along the
vertical sides interchange positions. The fifth symbol comes to lie in the upper middle and the lower middle positions alternately and is
replaced by a new one in each step. So in fig(3) ‘C’ should be replaced by a new symbol. Ans(3)
Q14
5
Solution
The left most arrow changes its position with each one of the arrows on the right in a sequence, the other one follows the same
sequence. In figure (5), the second arrow should have been the third one, the third arrow should have been the fourth one and the fourth
Ans.(5)
Q15
5
Solution
In the series, first the lines connecting the two ovals are changed to curved lines and then the two ovals change into rectangles one by
one. Further, the original figure is obtained by following the same steps but in reverse order. So, in figure (5), the connecting lines should
still have been curved and the rectangle must have changed into an oval.
Ans.(5)
Solution
3 Children = 1 Man
=> Work = 14 × 10 = 12 × D
where D is the required number of days. => D = 14 × 10/12 = 140/12 days = 11.66 days.
Q2
None of these
Solution
Q3
5 km
Solution
Q4
37.5 km
Solution
Q5
61
Solution
Required number of lines = Total lines formed by 12 points - number of lines formed by 4 collinear points + 1 = 12C2 – 4C2 + 1 = 61.
Q6
32768
Solution
Number of words = 8 × 8 × 8 × 8 × 8 = 85 = 32768 words.
Q7
0.96
Solution
The chance for A, B and C for NOT solving the problem is 0.5, 0.4 and 0.2, respectively. If all the three try, the probability for not solving the
problem is 0.04. Therefore, the chances that the problem is solved is 1 – 0.04 = 0.96
Q8
11/12
Solution
Q9
10
Solution
ab=LCM*HCF = 875.
(a+b)2-(a-b)2 = 4ab
(a-b)= 10.
Q10
24
Solution
HCF =8
Q11
3.62
Solution
30L+3Q=11.67
30L+6Q=12.48
------------
3Q=0.81
Q = 0.27
Q12
Rs.877.40
Solution
Let the costs of each kg of apples and each kg of rice be Rs.a and Rs.r respectively.
a = 147.6
Q13
6%
Solution
Q14
10000
Solution
All one legged people need one shoe per head and remaining people other than bare footed need two shoes per head.
Half of 9500 go bare footed and other half need two shoes⇒ 0.5 × 9500 = 4750 need shoes.
Q15
Rs 10.8
Solution
Section 3 - Verbal Ability
Q1
If the Arctic warming continues, much of the thin ice in the southern Arctic will disappear.
Solution
Choice (a): An exceptional year is not an argument against an enlarged range because an usually early snow could happen in the southern
arctic as well.
Choice (b): If their current predators also migrate northward, then the guillemots’ situation has not changed , so this is not an argument
Choice (c): The argument suggests that they will move not inland, but northward along the coast.
Choice (d): Correct. This statement properly identifies a factor that weakens the argument: the guillemots’ move northward would not
enlarge their range if they lost their food source, fish found under thin ice, in southern Arctic. The correct answer is option D.
Q2
Improved economic conditions in Western Europe and Japan resulted in substantially increased
Solution
Choice (a): The modern, more productive factories made possible by the tax cut offer a reason in support of the conclusion, not against it.
Choice (b): Correct. This statement properly identifies a factor that weakens the argument by providing an alternative explanation.
Choice (c): The economically productive investments made possible by the tax cut provide an example that supports, rather than
Choice (d): The rise in personal income after 1964 suggests that the tax cut of 1964 was responsible for this increase. The correct answer
is option B.
Q3
wavy
Solution
The word undulating means rolling or swelling. Crooked refers to dishonest, transparent refers to crystal clear and delicate refers to weak
or fragile. So the best answer is wavy which means curly or undulating. Ans.(2)
Q4
earthly
Solution
Q5
b
Solution
So there is an error in b.
Q6
d
Solution
Q7
In turn, as migratory people without territory or boundaries, gypsies have little or no political clout.
Solution
The passage highlights the efforts made by the European Commission to improve the lot of the wandering gypsies of Europe, without
having any effect on their culture. But, their wandering nature has created varied problems for the government to achieve its aim. Option
(b) is correct because it logically follows after the last statement of the paragraph which states that it is difficult to tax, educate or even
count them as they keep moving. Option (a) is incorrect as it is contradictory to the passage. Options (c) and (d) are incorrect as they
Q8
DBACE
Solution
1. 'D' is the opening sentence as it draws attention to the topic of discussion - science. It says that science has disturbed our universe. It
has to be followed by 'B'. 'B' talks about how eminent people in the field and their theories have constantly disturbed us (relocated). It is
followed by 'A', in which 'such disturbance' refers to what is stated in 'D' and 'B'. Also, it is clear that 'C' and 'E' form a pair. 'C' - 'No period…. '
Q9
DCEAB
Solution
The beginning words 'they', 'so' 'they', 'there' in the statements 'A', 'B', 'C' and 'E' respectively proclaim that they are not independent
Q10
because
Solution
Q11
In addition
Solution
in addition-as an extra person or thing.Here the need of medical supplies is in addition to shortage of food that the flood victims are
expiriencing
Q12
his / his
Solution
The correct answer is his / his , as the subject in the sentence is "Man" and it has to be in the possessive form.
Q13
frequently
Solution
The sentence implies that after a major life event, people can begin to see their friends suddenly again.
If any of the options were synonymous with "suddenly," they would be potential correct answers.
However, as such an answer is not provided, we need to find something else that contrasts well with not seeing friends for years.
Therefore, of the options provided, this is the only one that adequately works without importing other meanings (as happens with negative
Q14
by fair means or by foul means
Solution
The idiom "by hook or by crook" means by fair means or by foul means.
Q15
goose : gosling
Solution
Q1. Rs.65
Solution
Q2. 2000
Solution
= 1.25 x Sales.
= 2000 tons.
Q3. 0%
Solution
There is no increase as is evident (Both the sales values are 100 for '92 & for '96).
Q4. 100%
Solution
If the price in any one year exceeds by 100%, it will remain 100% as the increase is
Q5. 5000
Solution
=> X = 5000
(Price of A & B are taken as 50 & 100 Rs./kg Respectively as sales for '92 = sales for '96).
Q6. 272
Solution
Q7. 200
Solution
Q8. North
Solution
Clearly it is maximum for the north zone, among st the given zones.
Q9. 700
Solution
From Institute A =945 x 30 / 100 = 284 . From Institute B = 945 x 20 / 100 = 189
Solution
Q11. 1988
Solution
Q12. 1990
Solution
Year NP/GP
Q13. 1986
Solution
The growth in Gross Profit in 1986, as compared to the previous year is "5 units in 40". In
case of 1987, it is "5 units in 45" and in case of 1990, it is "5 units in 50". Hence, the
Q14. 2
Solution
The paired rise in the "Gross Profit" and "Net Profit" took place for 2 years (1986 & 1990).
Ans.(3)
Q15. >1 but <1.5
Solution
The largest difference is for the year 1987, i.e., 32.5 lakhs and the smallest difference is for
Solution
No Solution
Q2
18
Solution
Here the square bracket has the highest priority that’s why it is evaluated first. After that parenthesis enjoys the priority.Now a=5*4+x[b++]-
(9/b)=18.
Q3
No
Solution
No Solution
Q4
float
Solution
No Solution
Q5
Program will compile and print FAIL for 5 times
Solution
The ASCII value of 5 is 53, the char type-casted integral value 5 is 5 only.
Output:
$ cc pgm1.c
$ a.out
FAILED
FAILED
FAILED
FAILED
FAILED
Q6
000
Solution
No Solution
Q7
10
Solution
No Solution
Q8
10
Solution
No Solution
Q9
char[] str = “Best C programming classes by Placementseason”;
Solution
Q10
11,11
Solution
No Solution
Q11
8
Solution
Output:
$ cc pgm5.c
$ a.out
Q12
Line control
Solution
No Solution
Q13
No, C does not support it.
Solution
No Solution
Q14
From the point of declaration to the end of the file being compiled
Solution
No Solution
Q15
From the point of declaration to the end of the file being compiled
Solution
No Solution
Q16
All of the mentioned
Solution
No Solution
Q17
func(a);
Solution
No Solution
Q18
the first (row) subscript may be left empty
Solution
No Solution
Q19
string p = “Hello”;
Solution
No Solution
Q20
standard output
Solution
No Solution
Section 6 - Programming
Q1
Test Case
Input Output
8
Greater : 4
10 9 1 2 8 7 6 5
Lesser : 3
6 Exactly divides : 2
Weightage - 10
Input Output
7
Greater : 1
12 18 26 72 42 6 3
Lesser : 5
42 Exactly divides : 2
Weightage - 15
Input Output
12
Greater : 8
44 Exactly divides : 2
Weightage - 15
Input Output
11
Greater : 2
Weightage - 20
Input Output
4
Greater : 2
Weightage - 20
Input Output
14
Greater : 8
80 72 8 16 24 64 56 32 40 48 25 85 63 44
Lesser : 5
40 Exactly divides : 1
Weightage - 10
Input Output
10
Greater : 4
100 900 800 200 300 700 400 600 500 10000
Lesser : 5
Weightage - 10
10
Greater : 1
12 18 98 72 42 6 3 9 10 11
Lesser : 8
72 Exactly divides : 5
Solution
#include<stdio.h>
int main()
int i,less=0,greater=0,input,count=0,n;
scanf("%d",&n);
int arr[n];
for(i=0;i<n;i++)
scanf("%d",&arr[i]);
scanf("%d",&input);
for(i=0;i<n;i++)
if(input<arr[i])
greater++;
for(i=0;i<n;i++)
if(input>arr[i])
less++;
for(i=0;i<n;i++)
if(input%arr[i] == 0)
count++;
return 0;
Q2 Test Case
Input Output
smallcloud llamsduolc
Weightage - 20
Input Output
dewdrops dwedspor
Weightage - 20
Input Output
ketranjimmy arteknymmij
Weightage - 20
Input Output
bunnycart nnubytrac
Weightage - 20
Input Output
lemonkim omelmikn
Weightage - 20
placementseasoncoimbatore aestnemecalpserotabmiocno
Solution
#include <stdio.h>
#include <string.h>
#include<ctype.h>
#include<malloc.h>
int main()
char str[50];
scanf("%s",str);
int i,j,k,n;
n=strlen(str);
char *str1;
str1=(char*)malloc(n*sizeof(char));
if(n==1)
printf("%s",str);
else if(n==3)
*(str1+0)=*(str+(n-1));
*(str1+(n/2))=*(str+(n/2));
*(str1+(n-1))=*(str+0);
printf("%s",str1);
else
if(n%2==0)
for(i=0;i<n/2;)
for(j=(n/2)-1;j>=0;j--,i++)
*(str1+i)=*(str+j);
for(i=n/2;i<n-1;)
for(j=n-1;j>=n/2;j--,i++)
*(str1+i)=*(str+j);
printf("%s",str1);
else if(n%2==1&&n>3)
k=(n/2);
for(i=0;i<k;)
for(j=k-1;j>=0;j--,i++)
*(str1+i)=*(str+j);
*(str1+k)=*(str+k);
for(i=k+1;i<n-1;)
for(j=n-1;j>k;j--,i++)
*(str1+i)=*(str+j);
printf("%s",str1);
return 0;