ZOHO
ZOHO
ZOHO
Round – I
1. Write a C program for the following output
If input is 5
3. Get a 3 digit or 2 digit number and add it with the reversed number. Check whether the sum
is palindrome if not add it with the reversed number and check whether it is palindrome.
Example:
39+93=132
132+231=363 Stop
122+221=343 Stop
173+371=544
544+445=989 Stop
4. Reverse the string by keeping the special characters in the same position.
my name:? is natara!jan;
najara:?ta nsiema!nym;
7. Input: I buy a pen (by traversing only once through the array)
Output: n ipa u ubi
Zoho: Round – II
1. To check if given parenthesis is balanced or not
Ex.
a. { { [ ] } } – balanced
b. { { } ] - not balanced
2. I / P : 3
O/P: 0
a. 3 0 3
b. 2 3 0 3 2
c. 1 2 3 0 3 2 1
3. Get a 2 or 3 digit number as input, reverse the number and add with the same number and
check if the result and is palindrome or not. If it is not palindrome. eg. A in reverse the
numbers add and check if it is palindrome, if not repeat it 5 times .if it is not palindrome upto
5 steps print “No” if it is palindrome print “Yes”.
4. Reverse given string with space and special character at the same places
E.g. House 1 no :12
21one 1 su : oh
5. Generate a 10 digit number such that 1st number is divisible by 1, first & second number is
divisible by 2, first three number divisible by 3.first 10 number divisible by 10
6. No. of squares in a chess board (Answer: 12+22+…….+82)
7. There are 10 coins in 10 stack. Each stack weighs 10 grams except 1 stack which weights
11 grams. Find the heaviest stack in minimum no. of weighs in balance.
8. Cost of 1 horse = Rs.10
1 goat = Rs.1
8 ducks=Rs.1
A farmer has Rs.100. He has to buy 100 animals containing at least one in all the three
Cow?
9. A family was stuck inside a cave, father can travel through it within 1 min, mother in 2 min,
daughter 5 min, son 4 min. only two can travel through a tunnel at a time. No one travels
alone. Find the least time taken for the family to cross.
Note: The speed of the two (together) is the least among the two.
10. In a bus, there are 4 children. Each has 4 bag. Each bag has 4 dogs. Each dog has 4
puppies. Each puppy has 4 legs. Each leg has 4 toes. Find the total no. of toes in the bus.
11. X has bought 150 pens and misplaced some pens. The clue given by her to find the
misplaced pens are
i) The count when divided by 2 gives remainder 1
ii) The count %3 gives rem 2
iii) The count %4 gives rem 3
iv) The count %5 gives rem 4
v) The count %6 gives rem 5
vi) The count %7 gives rem 0
Find the no. of misplaced number
2. To find the minimum and maximum number in a given unsorted array within one iteration.
4. In a matrix, if an element ‘0’ is found, make the corresponding row and column as ‘0’. Find
the resultant matrix.
5. Print 1 to 100. Instead of nos. divisible by 15 print “fifteen” instead of nos. divisible by 3 print
“three” instead of nos. divisible by 5, print “five”.
What is graph, tree, map data structure