Coding | Mcqs | Multiple choice questions | Informative | Computer Science | Engineering | Aptitude | Quants | Verbal

INFEED

Daily Test | Mock Test 21| 10 Sep

 Numerical Ability


1.

What is the value of c , If 8 is 4% of a, and 4 is 8% of b. c equals b/a.
12
1/4
0.155
None of these
 

 

2.

if the antecedent and consequent of a ratio are increased by 5 and 6 respectively then the ratio is 5:6.
find the original ratio.
5 : 6
1 : 2
2 : 3
3 : 4

 

3.

The profit earned after selling an article for Rs 996 is the same as the loss incurred after selling the
article for Rs 894. What is the cost price of the article ?
RS 935
. RS 905
RS 945
RS 975
 

 

4.

Find the average of all the numbers between 6 and 34 which are divisible by 5?
30
24
20
18
 

 

5.

A bag contains 2 white balls, 3 black balls and 4 red balls. In how many ways can 3 balls be drawn from
the bag, if at least one black ball is to be included in the draw
64
128
132
222

 

6.

Sahil purchased a machine at Rs 10000, then got it repaired at Rs 5000, then gave its transportation
charges Rs 1000. Then he sold it with 50% of profit. At what price he actually sold it.
RS. 22000
as. 24000
as. 26000
as. 28000
 

 

7.

(4.8*1.813.6 +5.4 of 1/9 -1/5) =
28
38
48
58

 

8.

The wheel radius of the axis's car is 50 cm. What is the distance that the car would cover in 14
revolutions?
11 m
22 m
33 m
44 m
 

 

9.

4 men and 6 women finish a job in 8 days, while 3 men and 7 women finish it in 10 days. In how many
days will 10 women working together finish it ?
30 days
40 days
50 days
60 days

 

 

10.

what is the remainder of (16937^30)/31
1
2
3
6
 

 

11.

The time showed by an analog clock at a moment is 11 am then 1234567890 hours later it will show the
time as:
11 am
11 pm
5 am
4 pm

 

 

12.

Ravi's salary was reduced by 25%. Percentage increase to be effected to bring the salary to the original
level is
20%
25%
33 1/3%
30%
 

 

13.

log y 1369y=3 then what is the value of y?
38
37
36
35
 

 

14.

In how many years Rs. 150 will produce the same interest at 8% as Rs. 800 produce in 3 years at 9/2%
. 8
9
10
11
 

 

15.

The speed of a boat in still water is 15 km/hr and the rate of current is 3 km/hr. The distance travelled
downstream in 12 minutes is
1 6 km
2 km
3km.6
4 km

 

16.

A series of books was published at 10years intervals when the 10th book was issued the sum of
publication years was 19560. When was the 1st book published?
1910
1914
1911
1909

 

17.

Tickets numbered 1 to 20 are mixed up and then a ticket is drawn at random. What is the probability
that the ticket drawn has a number which is a multiple of 3 or 5?
1/2
2/5
8/15
9/20

 

18.

On dividing a number by 342, 47 is the remainder. What will be the remainder if the same number is
divided by 18?
11
6
8
2

 

19.

A’ and ‘B’ started a business in partnership investing Rs 20000/- and Rs 15000/- respectively. After six
months ‘C’ joined them with Rs 20000/-. What will be B’s share in the total profit of Rs 25000/- earned
at the end of two years from the starting of the business?
7000
7500
8000
8500

 

20.

Find the odd man out
3, 6, 9, 12
2, 4, 8, 16
12, 24, 36, 48
10, 13, 16, 19

 

21.

A person needs 6 steps to cover a distance of one slab. if he increases his foot length(step length) by 3
inches he needs only 5 steps to cover the slabs length. What is the length of each slab?
90 inches
24 inches
26 inches
43 inches
 

 

22.

Find the greatest number which on dividing 1661 and 2045, leaves a remainder of 10 and 13 respectively
125
127
129
131
 

 

23.

A card is drawn from a pack of 52 cards. The probability of getting a queen of club or a king of heart is:
1/13
2/13
1/26
1/52

 

24.

If 7 spiders make 7 webs in 7 days then 1 spider will make 1 web in how many days?
1
7
7/2
49

 

25..

Which is the following fraction for 2.04?
9/25
51/25
3/400
2081/250
 

 

26.

A is twice as good as a workman as B and together they finish a piece of work in 18 days. In how many
days will B alone finish the work.
27 days
54 days
56 days
. 68 days

 

----------------------------------------------------------------------------------------------------------------------

 

Reasoning Ability


1..

The following questions consist of two words each, that have a certain relationship with each other,
followed by four lettered pairs of words. Select the letter pair that has the same relationship as the
original pair of words.
Geeta : Quran
Orange : Mango
Temple : Worship
Good : Man
Army : Defence

 

2.

Statement :
The Industrial Revolution which first of all started in Europe has brought about the modern age.
Conclusions :
I. Disparity between rich and poor results in revolution.
II. Revolution overhauls society.
Only conclusion I follows
Only conclusion II follows
Either I or II follows
Neither I nor II follows
Both I and II follow

 

3.

The following questions consist of two words each that have a certain relationship with each other,
followed by four lettered pairs of words. Select the letter pair that has the same relationship as the
original pair of words.
Mendacity : Honesty
Truth : Beauty
Sportsmanship : Fortitude
Courageous : Craven
Turpitude : Depravity
 

 

4.

Either Susmith is happy or he met his girlfriend.
(i) Susmith is happy
(ii) Susmith is sad
(iii) Susmit met his girlfriend
(iv) Susmit didn't meet his girlfriend.
(i) and (iv)
(Ii) and (iii)
(iv) and (i)
None of these

 

 

5.

Given signs signify something and on that basis, assume the given statements to be true and find
which of the two conclusions I and II is/are definitely true.
P + Q means P is greater than Q
P* Q means P is greater than or equal than Q
P =Q means P is equal to Q
P/Q means P is less than Q
P - Q means P is less than or equal to Q
Statements: X/Y, W*Z, Z+Y
Conclusions
I. w+y
II. X/Z
Only conclusion I is true
Only conclusion Il is true

Neither conclusion I nor Il is true
Both conclusion I and II are true
 

 

6.

Statement:
Fortune favours the brave
Conclusions :
I. Risks are necessary for success.
II. Cowards die many times before their death.
Only conclusion I follows
Only conclusion II follows
Either I or II follows
Neither I nor II follows

Both I and II follow

 

 

7.

Three of the following four are alike in a certain way and so form a group. Which is the one that does not
belong to that group?
Kerala
Maharashtra
West Bengal
Uttar Pradesh
 

 

8.

Statement :
Modern man influences his destiny by the choice he makes unlike in the past.
Conclusions :
I. Earlier there were less options available to men.
Il. There was no desire in the past to influence destiny.
Only conclusion I follows
Only conclusion II follows
Either I or II follows
Neither I nor II follows

Both i and ii follow\

 

9.

Select the right option from the given alternatives
OQT : FHK :: DFI: ?
CEH
BEH
BFH
AFH
 

 

10.

If you don't save money you will not get reward.
(i) You saved money
(ii)you didn't save money
(iii)you got reward
(iv) you didn't get reward
(i) and (iv)
(Ii) and (iii)
(iv) and (i)
None of these
 

 

11.

Select the right option from the given alternatives
‘WOLLS: XPMMT :: PILOT : ?
QJMPU
QJJPU
QMMPU
QMJPU
 

 

12.

Statement :
People who speak too much against dowry are those who had taken it themselves.
Conclusions:
I. It is easier said than done.
II. People have double standards.
Only conclusion I follows
Only conclusion II follows
Either I or II follows
Neither I nor II follows

Both i and ii follow

 

13.

The following questions consist of two words each that have a certain relationship with each other,
followed by four lettered pairs of words. Select the letter pair that has the same relationship as the
original pair of words.
Sin: Crime
Man : Animal
Home : Court
Morality : Legality
Jury : Priest

 

14.

Statement :
vegetable prices are soaring in the market.
Conclusions :
I. Vegetables are becoming a rare commodity.
II. People cannot eat vegetables.
Only conclusion I follows
Only conclusion II follows
Either I or II follows
Neither I nor II follows

Both i and ii follow

 

15.

Statement :
It is almost impossible to survive and prosper in this world without sacrificing ethics and morality
Conclusions :
I. World appreciates some concepts but may not uphold it.
II. The Concepts of ethics and morality are not practicable in life.
Only conclusion | follows
Only conclusion II follows
Either I or II follows
Neither I nor II follows
Both i and ii follow

 

 

16.

Fill in the blank spaces in the series with appropriate choices:
48, 45, 40, 33, 24, __ , __
11, 12
12, 13
13, 0
9, 11

 

 

17.

The following questions consist of two words each that have a certain relationship with each other,
followed by four lettered pairs of words. Select the letter pair that has the same relationship as the
original pair of words.
Chair : Wood
Book : Print
Mirror : Glass
Plate : Food
Purse : Money

 

 

18.

Mobile is charged, if power is off.
(i)Mobile is charged
(ii) mobile is not charged
(iii) power is off
(iv) power is not off
(i) and (iv)
(Ii) and (iii)
(iv) and (i)
None of these

 

 

19.

The following questions consist of two words each, that have a certain relationship each other, followed
by four lettered pairs of words. Select the letter pair that has the same relationship as the original pair of
words.
Water : Oxygen
Helium : Nitrogen
Salt : Sodium
Tree : Plant
Food : Hunger

 

 

20.

Statements:
All pens are pins.
No tag is a pin
All papers are pens
Conclusion:
I. No pen is a tag
II. All papers are pins
III. All pins are definitely not tag
Only I follows
Only II follows
Only Il and III follow

all ....

 

 

21.

The following questions consist of two words each, that have a certain relationship with each other,
followed by four lettered pairs of words. Select the letter pair that has the same relationship as the
original pair of words.
Sumptuous : Luxurious
grapple : harmonize
lavishing : destitute
elated : jubilant
melancholy : gleeful
 

 

22.

Statement :
In case of outstanding candidates, the condition of previous experience of social work may be waived
by the admission committee for M.A. (Social Work).
Conclusions :
I. Some of the students for M.A. (social work) will have previous experience of social work.
II. Some of the students of M.A. (social work) will not have previous experience of social work.
Only conclusion I follows
Only conclusion II follows
Either I or II follows
Neither I nor II follows

Both i and ii follow

 

 

23.

Unless you study, you can not crack CAT
(i) you cracked CAT
(ii) You could not crack CAT
(iii) You did study
(iv) you didn't study
(i) and (iv)
(ii) and (iii)
(iv) and (i)
None of these

 

 

24.

Statement :
The interview panel may select a candidate who neither possesses the desired qualification nor the
values and attributes.
Conclusions:
1. The inclusion of specialists on the interview panel does not guarantee that the selection will be
proper.
Il. The interview test has certain limitations in the matter of selection of candidates.
Only conclusion I follows
Only conclusion II follows
Either I or II follows
Neither I nor II follows

Both i and ii follow

 

 

25.

Statements:
I. The bank decided to give advances to the priority sector at the rate of interest at par with the
corporate sector.
II. The percentage of bad loans given by the banks to the priority sector is very low compared to
corporate sector.
Both the statement I and II are effects of independent causes.
Statement I is the cause and statement II is its effect.
Statement Il is the cause and statement | is its effect.
Both the statement I and II are independent causes.

 

26.

Unless boss is present employees don't work
(i) Boss is present
(ii) Boss is not present
(iii)Employee work
(iv) Employee don’t work
(i) and (iv)
(Ii) and (iv)
(iv) and (i)
None of these

 

 

27.

Statements: No plant is a tree. All trees are roots. Some branches are roots Conclusions: I. All roots being
plants is a possibility II. Some roots are definitely trees III. At least some branches are definitely not
trees
Only I follows
Only II follows
Only Il and III follow
Only I and II follow

 

 

28.

Thermometer: Temperature:: Barometer:
Strain
Force
Stress
Pressure

 

 

29.

In each of the following questions, there is a certain relationship between two given words on one side
of (: :) and one word is given on another side (: :) while another word is to be found from the given
alternatives, having the same relation with this word as the word of the given pair bear. Choose the
correct alternative.
Foot : ? : : Hand : Wrist
Length
Shoe
Ankle
Leg

 

 

30.

Find the correct alternative to complete the analogy.
Confute : Rebut :: Repellent : ?
Pusher
Attractive
Repugnant
Spray

--------------------------------------------------------------------------------------------------------------------

 

Verbal Ability

 

1.

Choose the most appropriate synonym
CAPRICIOUS
Excess
Sudden
Constant
Formal
private

 

2.

Instruction: Arrange all the parts in a proper sequence to form a meaningful sentences
The water tanks may remain empty (A) on Tuesday evening (B) in the city (C) as the water supply
department will repair the damaged water pipes (D)
BADC
BACD
DBAC
ADCB
 

 

3.

Instruction: Select the word which is farthest in meaning to the word given in the question.
In each of the questions given below from the given options select the word which is farthest in
meaning to the word given in the question.
Culpable
ineffable
Incriminated
innocent
Indignant

 

 

4.

Choose the best fit for the blank.
Nowadays, Rajini is ____ busy to take care of her health.
Very
Too

So
Extremely

 

 

5.

About twenty clerks were made _ when the banks introduced computers.
dispensable
redundant
expandable
obsolete

 

 

6.

Choose the synonym.
FALLACY
Illusion
Elusion
Misconception
frankness

 

 

7.

Select the proper order for the four sentences.
S1. Ms. Parasuram started a petrol pump in Madras. P. A total of twelve girls now work at the pump. Q.
She advertised in newspapers for women staff. R. They operate in two shifts. S. The response was good.
S6. Thus she has shown the way for many others.
PQSR
SQPR
QSPR
PQRS

 

 

8.

Choose the best fit for the blank.
Hawkins is __ in his field; no other contemporary scientist commands the same respect.
Preeminent
Ignominious
Obsolete
anachronistic

 

 

9.

Delhi is _ large city.
an
a
an
the
 

 

 

10.

Choose the most appropriate synonym AFFLUENT
Extreme
Initiate
Precede
Prosperous
Simple

 

 

11.

_ Himalayas provide protection to India against enemies.
no article
A
An
The
 

 

12.

The river overflowed its _ and flooded the area.
edges
fronts
limits
banks

 

 

13.

Identify the part that has an error. Select ‘D’ if you find no error.
a)The house with all its / b)furniture and exotic plants / c) were sold for Rs. 50,000 / d) No error
A
B
C
D

 

 

14.

Choose the most logical fit for the blank.
An honest man never __ to lie in order to fulfill his goals.
Helps
Tells
Resorts
forms
 

 

 

15.

Select the word which best expresses the MEANING of the word in CAPITALS EMANATE
End
Culminate
Originate
Retreat
 

 

 

16.

Choose the most appropriate order of the sentences.
A. There are more than 20 major languages and several hundred minor ones and it is a home of several
major religions. B. There are several million indigenous people living in different parts of the country. C. In
spite of all the diversities, we share a common landmass. D. India is a land of continental proportions
and immense diversities.
DABC
DCBA
CABD
BACD

 

 

17.

Instruction: Select the word which is closest in meaning to the word given in the question.
In each of the questions given below from the given options select the word which is closest in meaning
to the word given in the question.
PROSAIC
pedestrian
creative
exceptional
different

 

 

18.

Her parents will never give their _ to so much an unsuitable match.
acquiescence
consent
agreement
willingness
 

 

 

19.

_ Indus river is the longest river in India.
The
An
A
None

 

 

20.

Identify the part that has an error. Select ‘D’ if you find no error.
The teacher asked the students (a) / if everyone of them were interested in (b) / going on an excursion
(c) / no error
A
B
C
D
 

 

 

21.

Instruction: Select the word which is closest in meaning to the word given in the question.
Contrary to my belief, he turned out to be peevish.
proud
irritable
selfish
greedy

 

 

22.

Instruction: Find the part of the sentence that has an error.
Panic gripped the people (A) of the village (B) beside the city (C) on Friday (D) after the terrorist attack.
CABD
BACD
ABCD
ACDB

 

 

23.

In each of the questions given below from the given options select the word which is closest in meaning!
EGREGIOUS
outrageous
minor
secondary
wonderfu

 

 

24.

Read each sentence to find if there is any grammatical error in it. If there is any error, it will be only one
part of the sentence. The number or alphabet of that part is your answer. (Disregard punctuation errors
if any)
I never have / visited / or intend to visit/ foreign countries /
A
B
C
D
 

--------------------------------------------------------------------------------------------------------------------

 

 Technical Mcq


1.

What will strcmp() function do?
compares the first n characters of the object
compares the string
undefined function
copies the string

 

 

2.

What will be the output of the following C code?
const char pla[] = "string1";
const char src[] = "string2";
printf("Before memmove place= %s, src = %s\n", pla, src);
memmove(pla, src, 7);
printf("After memmove place = %s, src = %s\n", pla, src);
Before memmove place= string1, src = string2 After memmove place = string2, src = string2
Before memmove place = string2, src = string2 After memmove place= string1, src = string2
Before memmove place = string2, src = string1 After memmove place= string2, src =string2
Before memmove place= string1, src = string2 After memmove place=string1, src = string1
 

 

 

3.

Which code from the given option return pointer to last occurrence of c in ch or NULL if not present?
char *strchr(ch, c)
char *strrchr(ch, c)
char *strncat(ch, c)
char *strcat(ch, c)

 

 

4.

Which among the following is Copying function?
memcpy()
strcopy()
memcopy()
strxcpy()

 

 

5.

What is the output of C Program with String arrays.?
int main()
{
 char *p1 = "GOAT";
 char *p2;
 p2 = p1;
 p2="ANT";
 printf("%s", p1);
}
ANT
GOAT
G
A

 


6.

The __ function appends not more than n characters.
strcat()
strcon()
strncat()
memcat()

 

 

7.

Which of the following is the variable type defined in header string. h?
sizet
size
size_t
size-t

 

 

8.

What will be the output of the following C code?
const char str1[]="ABCDEF1234567";
const char str2[] = "269";
len = strcspn(str1, str2);
printf("First matching character is at %d\n", len + 1);
First matching character is at 8
First matching character is at 7
First matching character is at 9
First matching character is at 12

 

 

9.

What is the output of C Program with String Arrays.?
int main()
{
 char p[] = "GODZILLA";
 int i=0;
 while(p[i] != '\0')
 {
 printf("%c",*(p+i));
 i++;
 }
}
G
GODZILLA
Compiler error

None of the above

 

 

10.

What is the prototype of strcoll() function?
int strcoll(const char s1,const char s2)
int strcoll(const char *s1)
int strcoll(const s1,const s2)
int strcoll(const *s1)

------------------------------------------------------------------------------------------------------------------

 

 Programming


1.

Problem statement
Given a 1-indexed String 5 of length N, consisting of lowercase English alphabets, you need to answer
queries based on the properties of this string.
You shall be given Q queries to answer. In each query you shall be given 2 integers Land R. Now, you
need to report the minimum number of String elements you need to delete in the substring of Strings
ranging from L to Rinclusive, so that each distinct character occurring in the range occurs equal
number of times
For example, consider the String" abcdab”. Here, the characters occurring in this String are a. b, c and d.
On deleting one occurrence of a as well as b one of the possible Strings is abcd. Each character
occuring in the range now occurs equal number of times. So, the minimum number of deletions is two.
Note that we need to equalize the count of only characters that occur in the range, and not of
characters that do not. It is allowed to delete all occurences of a character, so that it no longer occurs
in the range at all Can you do it?
Input Format
The first line contains 2 space separated integers and Q. The next line contains the String 5. Each of
the next Qlines contains 2 space separated integers Land R, denoting the parameters of the zith query.
Constraints
1<N, Q< 10^5
1<=L<=R<=N
Output Format
Print the answer to each query on a new line

 

JAVA CODE:

 

 import java.io.*;

import java.util.*;

public final class Main

{

    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

    static FastScanner sc=new FastScanner(br);

    static PrintWriter out=new PrintWriter(System.out);

    static Random rnd=new Random();

    static int[][] pre;

    static int[] sum=new int[26];

    

    public static void main(String args[]) throws Exception

    {

        int n=sc.nextInt(),q=sc.nextInt();char[] a=sc.next().toCharArray();pre=new int[26][n];

        for(int i=0;i<n;i++)

        {

            sum[a[i]-'a']++;

            for(int j=0;j<26;j++)

            {

                pre[j][i]=sum[j];

            }

        }

        for(int i=0;i<q;i++)

        {

            int l=sc.nextInt()-1,r=sc.nextInt()-1;int[] cnt=new int[26];

            for(int j=0;j<26;j++)

            {

                cnt[j]=(pre[j][r]-(l==0?0:pre[j][l-1]));

            }

            List<Integer> list=new ArrayList<Integer>();int sum=0;

            for(int j=0;j<26;j++)

            {

                if(cnt[j]>0)

                {

                    list.add(cnt[j]);sum+=cnt[j];

                }

            }

            int now=0,ans=Integer.MAX_VALUE;Collections.sort(list);

            for(int j=0;j<list.size();j++)

            {

                int curr1=now,curr2=sum-now,curr3=curr2-(list.get(j)*(list.size()-j));

                now+=list.get(j);ans=Math.min(ans,curr1+curr3);

            }

            out.println(ans);

        }

        out.close();

    }

}

class FastScanner

{

    BufferedReader in;

    StringTokenizer st;


    public FastScanner(BufferedReader in) {

        this.in = in;

    }

    

    public String nextToken() throws Exception {

        while (st == null || !st.hasMoreTokens()) {

            st = new StringTokenizer(in.readLine());

        }

        return st.nextToken();

    }

    

    public String next() throws Exception {

        return nextToken().toString();

    }

    

    public int nextInt() throws Exception {

        return Integer.parseInt(nextToken());

    }


    public long nextLong() throws Exception {

        return Long.parseLong(nextToken());

    }


    public double nextDouble() throws Exception {

        return Double.parseDouble(nextToken());

    }

}




2.

Problem statement
You are given a string S consisting of lowercase alphabets. A good subsequence of this string is a
subsequence which contains distinct characters only. Determine the number of good subsequences of
the maximum possible length modulo 10^9 +7. In other words, determine the length X of the longest
good subsequence and the number of good subsequences of length X modulo 10^9 +7.
Input Format
• First line: An integer T denoting the number of test cases
• Each of the next T lines: String S
Constraints
1<T < 10
1<|S|<10^5
Output Format
For each test case, print the number of good subsequences of the maximum length modulo 10^9 +7.
Answer for each test case should come in a new line.
Sample Input:
7
ncdadbmhjfkl
mfijdmeebmed
hcbmgjpdcime
fjpkbjpijcjd
jhbcolmnfmpk

 

 PYTHON CODE:


from collections import Counter

 

for i in range(int(input())):

   # s= list(set(input()))

   s=input()

   ans=1

   c=Counter(s).values()

   for i in c:

       ans*=i

   print(ans%(10**9+7))

----------------------------------------------------------------------------------------------------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Post a Comment

Previous Post Next Post