TCS Ninjas Mock Test 1


TCS Ninjas Logical Reasoning Question


1.Which letter will come in the place of question mark in the puzzle?

Logical Reasoning Question 1

a)P
b)N
c)R
d)U


(c) is the correct option.


2.Select the correct option based on the following criteria:
A. If data in statement l alone is sufficient to answer the question.
B. If data in statement ll alone is sufficient to answer the question.
C. If data of both either statement Lalone or statement ll alone are sufficient to answer the question.
D. If data in both statements I & Il together are necessary to answer the question.

I. X is older than Y.
Z is younger than W.
II. W is older than Z.
X is younger than Z.
Who is younger among W, X and Z?
a)C
b)A
c)B
d)D


(b) is the correct option.


3.Select the correct option based on the following criteria:
A.If data in statement l alone is sufficient to answer the question.
B.If data in statement ll alone is sufficient to answer the question.
C.If data of both either statement Lalone or statement ll alone are sufficient to answer the question.
D.If data in both statements I & Il together are necessary to answer the question.
I.Point S is towards north of point T and point U is 20 meter east of point S.
II.Point V is towards south-west of point S and point S is 10 meter from point T.
What is the distance between point T and point U?

a)D
b)C
c)B
d)A



(a) is the correct option.


4.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'.
The numbers in different segments show the number of persons for that segment.

Logical Reasoning Question 2

How many government employed doctors are either corona warriors or males on both?
a)73
b)22
c)38
d)35



(a) is the correct option.


5) & 6). Based on the following data, answer the questions:
Amisha wanted to throw a reception party. The expenditure percentage distribution of the party was 30% on Catering, 25% on Decoration, 20% on Music system, 15% on Photography & Videography and 10% on invitations. The total expenditure was Rs. 1,059,600.

Q5.How much money was spent on photography & videography and invitations together?

a)Rs.264,900
b)Rs.158,940
c)Rs.136,092
d)Rs.211,920



(a) is the correct option.


6)How much money was spent on decoration in the party?

a)Rs.264,900
b)Rs.27,830
c)Rs.42,384
d)Rs.158,940



(a) is the correct option.


7)Choose the pair similar to the following
MDXF: OBZD

a)ILPR:KNRT
b)SGFN:UEHL
c)CLPQ:MXCF
d)BMXT:COZW



(b) is the correct option.


8)Two sentences are followed by two conclusions numbered I, II. Assuming the statements to be true, if they do not conform to real world knowledge, decide which of the conclusion(s) logically follows/follow from the given statements.
Statements:
A.All Cats are Lions.
B.Some Lions are Tiger.
Conclusions:
I.Some Tigers are Cats.
II.Some Lions are Cats.

a)Neither conclusion I nor II follows.
b)Both conclusions I & II follow.
c)Only conclusion II follows.
d)Only conclusion II follows.



(d) is the correct option.


9)Which of the following elements satisfies the Venn diagram?

Logical Reasoning Question 3

a)Quadrilaterals,Square,Triangle
b)Colour,Plate,Fork
c)Doctor,Patient,Nurse
d)Transport,Bus,Cycle



(a) is the correct option.


TCS Ninjas Quants Question


1. If the 5-digit number 776xy is divisible by 3, 7 and 11, then the value of (5x+3y)?

a)13
b)21
c)23
d)26



(c) is the correct option.


Logical Reasoning Question 4

Find the relation between x and y
a)x-y=1
b)x+y=1
c)x/y=1
d)x*y=1



(a) is the correct option.


Responsive image

a)3.85
b)3.45
c)4.35
d)4.85



(d) is the correct option.


4.If a3+b3=539 and a+b=11,the value of √{(a+b)2+7ab} is:

a)18
b)17
c)13
d)19



(b) is the correct option.


5)In an examination, 55% of the students passed and 621 failed. If the number of students for the exam was 69% of those who had applied for the exam, how many students applied for the examination?

a)1960
b)1380
c)2000
d)1800



(c) is the correct option.


6)In 2020, a certain number of students for institute A appeared in the annual examination and 35% of the students failed. In the same year, 250% more students than that of A appeared in the same examination from institute B. If 70% of the total students of A and B, passed the examination, then the fail percentage of students of institute B is ________ . (correct to one decimal place)

a)31.4
b)25.7
c)32.2
d)28.6



(d) is the correct option.


7)A milkman adds 20% water to a given quantity of milk. He marks the price of adulterated milk by 25% of price of pure milk. What discount should he offer on the marked price for no profit no loss situation?

a)25%
b)20%
c)16%
d)33%



(d) is the correct option.


8)A milkman adds 20% water to a given quantity of milk. He marks the price of adulterated milk by 25% of price of pure milk. What discount should he offer on the marked price for no profit no loss situation?

a)25%
b)20%
c)16%
d)33%



(a) is the correct option.


9)The difference between the simple interests accrued on a sum at p% p.a. and (p-5)% p.a. after four years will be Rs. 12,000. Find the sum?

a)Rs.80,000
b)Rs.72,000
c)Rs.60,000
d)Rs.50,000



(b) is the correct option.


10)What is the difference between the compound interest on Rs.60000 at the rate of 12% per annum compounded annually in 2 years and simple interest earned on Rs.50000 at 16% per annum in 2 years?

a)Rs.746
b)Rs.856
c)Rs.816
d)Rs.736



(d) is the correct option.


11)If a:b=2:3; b:c=4:5; and d is 20% more than c, find the ratio between a and d?
a)4:9
b)8:9
c)4:7
d)1:4



(a) is the correct option.


12)Aditya, Bhaskar and Chandu divide an amount of Rs. 10,200 among themselves in the ratio 4:7:6. Aditya and Chandu give Rs.600 each to charity and Bhaskar lent Rs. 3,000 to Pradeep and earned an interest of Rs. 1,200. Find the ratio of amounts with them now.

a)5:4:6
b)3:5:9
c)4:5:6
d)3:9:5



(b) is the correct option.


13)pipes a and b can fill an empty tank in 20 mins and x mins respectively, whereas c can empty the full tank in 60mins. when pipes a, b and c are opened simultaneously the tank will be filled in 15 minutes. what is the value of x?
a)40
b)20
c)30
d)45



(b) is the correct option.


14)The lengths of trains X and Y are 240m and 300m respectively. X and Y pass a static pole in 6 and 12 seconds respectively. In what time (in seconds) will they cross each other, if they move in the same direction?
a)36
b)24
c)18
d)30



(a) is the correct option.


15)The mean of the first 7 multiple of smallest composite number is K, then find the median of the following numbers.

10, K, 13, 12, 16, 14 and 18

a)15
b)13
c)16
d)14



(d) is the correct option.


TCS Ninjas Verbal Question


1. One part of the sentence below may contain an error. Identify the part. If there is no error, choose ‘No error’.

When Shailja will come, we will have to talk about the issue together.

a)No error.
b)About the issue together.
c)We will have to talk.
d)When Shailja will come



(d) is the correct option.


2)One part of the sentence below may contain an error. Identify the part. If there is no error, choose ‘No error’.

Real Madrid brilliantly played against Barcelona last night.

a)brilliantly played.
b)against Barcelona last night.
c)Real Madrid.
d)No error.



(a) is the correct option.


3.One part of the sentence below may contain an error. Identify the part. If there is no error, choose 'No error'.

Tyrion Lannister is better of the two advisors of the queen.

a)Tyrion Lannister is better.
b)of the queen.
c)No error
d)of the two advisors



(c) is the correct option.


4.Select the most appropriate option to fill in the blank.

Let us wait ______ the clock strikes twelve.

a)up to
b)since
c)until
d)unless



(c) is the correct option.


5)I ___________ waiting for two hours and I cannot wait any longer.

a)have been
b)would been
c)would have been
d)should be



(a) is the correct option.


6). Select the most appropriate option to fill in the blanks

Srikant _______ his corporate job and joined the TASC force to ____ his country.

a)relinquish;serve
b)has relinquish; served
c)relinquished; serve
d)relinquished: served



(c) is the correct option.


7) For the four-sentence (S1 to S4) paragraph below, sentence S1 and S4 are given. From the options P,Q and R, choose the most appropriate sentences for S2 and S3 respectively.

S1.Although we commonly say that fire ants bite, fire ants actually sting.
S2.
S3.
S4.But the younger ones, whose stingers and skeletons are not fully developed, play deada)25%.

P.Adult fire ants are aggressive and attack in swarms.
Q.They sting humans who disturb their nest.
R.Their nest consists of a loose mound with small cavities for ventilation.

A.RP
B.PR
C.QP
D.PQ



(c) is the correct option.


8).For the four sentence (s1 to S4) paragraph given below, sentences S1 and S4 are given. From the options P, Q and R, choose the appropriate sentences for S2 and S3 respectively.

S1. Matcha tea is a variant of the Japanese green tea.
S2.
S3.
S4. According to many sources, the main antioxidant in green tea, EGCG, boosts metaback.
P. One serving of Matcha tea has 10 times more antioxidants than one cup of brewer green tea
Q. It is made from whole tea leaves and packed with antioxidants.
R. Green tea gets its signature green colour from chlorophyll, which is a powerful detoxifier.
a)RP
b)PQ
c)QP
d)RQ



(c) is the correct option.


9).Some sentences are missing from the given text. Choose from the list (A-C) the most appropriate for each gap (1-2) in the text. There is one extra sentence/part that you do not need to use. Krupabai Satthianadhan was India’s pioneering writer in English. ____1____ She also authored a novel Saguna--A story of Native Christian life. ___2___ Krupabai then went on to write another novel Kamala--A story of Hindu Life before her untimely death at the age of 31. This was published posthumously.

A. A native of the Bombay Presidency, she wrote articles for periodicals under the by-line An Indian Lady.
B. Queen Victoria is believed to have read this novel and been impressed.
C. Krupbai received a scholarship to study medicine in the Madras Medical College.

a.(1)-A,(2)-B
b.(1)-A,(2)-C
c.(1)-C,(2)-A
d.(1)-B,(2)-C



(a) is the correct option.


10)Which one of the following sentences uses formal Language?

a.Can I sit beside you?
b.I would be grateful if you consider my leave application.
c.Let’s go to the park today.
d.Hey! What are you doing here?



(b) is the correct option.


11)The following sentence can be revised into one better sentence.
Choose the sentence that is the best answer.

The principal met the students. The principal had won an award.

a.The principal met the students and they had won an award.
b.The principal who had won an award met the students.
c.The principal met the students who had won an award.
d.The principal met the students and won an award.



(b) is the correct option.


TCS Ninjas Programming MCQ Question


1.A pointer variable can be

a)Changed within function.
b)Assigned an integer value.
c)Passed to a function as argument.
d)None of these.

See the Answer


(c) is the correct option.


Q2. Which of the following uses structure?

a)Linked Lists
b)Array of structures
c)Binary Tree
d)c)All of these



(d) is the correct option.


Q3. Strings are character arrays,The last index of it contains the null-terminated character

a)\0
b)\1
c)\n
d)c)t



(a) is the correct option.


Q4. Which of the following is a collection of different data types?
a)String
b)Structure
c)Array
d)File



(b) is the correct option.


Q5.What function should be used to free the memory allocated by calloc()?

a)free();
b)malloc(variable_name,0)
c)delloc()
d)memelloc(variable_name,0)



(a) is the correct option.


Q6.What function should be used to free the memory allocated by calloc()?

a)free();
b)malloc(variable_name,0)
c)delloc()
d)memelloc(variable_name,0)



(a) is the correct option.


Q7.In the standard library of C programming language, which of the following header file is designed for basic mathematical operations?
a)conio.h
b)stdio.h
c)math.h
d)dos.h


(c) is the correct option.


Q8.int **ptr; is?
a)pointer to integer
b)pointer to pointer
c)Invalid Declaration
d)None of these.



(b) is the correct option.


TCS Ninjas Coding Question

Problem I(Sweet Seventeen)

Given a maximum of four digit to the base 17(10 -> A, 11 -> B, 12 -> C, 16 -> G) as input, output its decimal value.

Input Format:

Read base 17 number from standard input stream.

Output Format:

Print the decimal Value to standard output stream

Example I:

Input:10GF
Output:5200

#include<bits/stdc++.h>
using namespace std;
long long convert(string str)
{
    long long deci=0;
    int i=0,val;
    int n=str.length()-1;
    for(i = 0;i<str.length();i++)
    {
        if(str[i]>='0' && str[i]<='9')
        {
            val=str[i]-48;
        }
        else if(str[i]>='a' and str[i]<='g')
        {
            val=str[i]-97+10;
        }
        else if(str[i]>='A' and str[i]<='G')
        {
            val=str[i]-65+10;
        }
        deci=deci+val*pow(17,n);
        n--;
    }
    return deci;
}
int main()
{
    string str;
    cin>>str;
    cout<<convert(str);
    return 0;
}


Problem II(A Sober Walk)

Our hoary culture had several great persons since time immemorial and king vikramaditya’s nava ratnas (nine gems) belongs to this ilk.They are named in the following shloka:

Logical Reasoning Coding Question 1

Among these, Varahamihira was an astrologer of eminence and his book Brihat Jataak is recokened as the ultimate authority in astrology.
He was once talking with Amarasimha,another gem among the nava ratnas and the author of Sanskrit thesaurus, Amarakosha.
Amarasimha wanted to know the final position of a person, who starts from the origin 0 0 and travels per following scheme.

Schema:

i)He first turns and travels 10 units of distance
ii)His second turn is upward for 20 units
iii)Third turn is to the left for 30 units
iv)Fourth turn is the downward for 40 units
v)Fifth turn is to the right(again) for 50 units
...And thus he travels, every time increasing the travel distance by 10 units.


Output Format:

Print the decimal Value to standard output stream



Example I:

Input: 3
Output: -20 20



#include<iostream>
using namespace std;
void solve(int n)
{
    char ch='R';
    int x=0;
    int y=0;
    int dist=10;
    while(n)
    {
        switch(ch)
        {
            case 'A':
                x=x+dist;
                ch='R';
                dist=dist+10;
                break;
            case 'D':
                y=y-dist;
                ch='A';
                break;
            case 'L':
                x=x-dist;
                ch='D';
                dist=dist+10;
                break;
            case 'R':
                x=x+dist;
                ch='U';
                dist=dist+10;
                break;
            case 'U':
                y=y+dist;
                ch='L';
                dist=dist+10;
                break;   
        }
        n--;
    }
    cout<<x<<" "<<y<<endl;
}
int main()
{
   int n;
   cin>>n;
   solve(n);
   return 0;
}