MCQ : Aptitude + Coding


 

1.      Which of the following is the equation of a straight line that passes through point (4,3) and I perpendicular to the line, 2x + y + 1 = 0?

a)      2y – 2x = 0

b)     2y – x – 1 =0

c)      Y – x = 0

d)     2y – x – 2= 0

 

2.      In a college there are two departments science and commerce. There are five female and four male teachers in the science department. The commerce department has four female and five male teachers. A team of eight teachers to be selected for a conference in such a way that there are four male and four female teachers. Additionally an equal number of teachers should be selected from each department. In how many ways can the team be selected ?

a)      2486

b)     3646

c)      5626

d)     6816

 

3.      The wages of a worker are Rs 43/hr hour for regular working hours, and Rs 62/hr hour for overtime. It is given that he works only five days in a week and there are nine regular working hours per day. What is the total number of hours that he worked if he earned Rs 37,199 in 19 weeks and was present on all working days?

a)      847 hrs

b)     227 hrs

c)      867 hrs

d)     862 hrs

 

4.      Two fair dice are thrown simultaneously, until a sum of six or seven is obtained. Which of the following is the probability that a total of seven is obtained before six?

a)      5/8

b)     7/3

c)      6/11

d)     3/10

e)     8/13

 

 

5.      Which of the following is the equation of a locus of a point, which moves in a such a way that its distance from a point A (0,ab) is b times its distance from point B(0,a/b) where b>0 and b is not equal to 1?

a)      X2 + Y2 = a2

b)     X2 + Y2 = a2 – 4abY

c)      X2 + Y2 = b2

d)     2X2 + 2Y2 = a2

e)     X2 – Y2 = b2

 

 

6.      If two diameters of the circle have equation 3x – 4y -= 5 and 3x – 5y = 7 and the area of the circle is 154 sq.units , thenwhich of the following is the equation of the circle?

a)      X2 + y2 -2x + 4y + 45

b)     X2 + y2 +2x + 4y = 44

c)      X2 + Y2 +2x + 4y = 44

d)     X2 + y2 – 2x + y = 34

e)     X2 + y2 – 2x +y = 49

 

7.      From a deck of 52 cards , three cards are randomly picked. What is the probability that two cards are queen and one is spade?

a)      1/3400

b)     3/1235

c)      24/2213

d)     26/1101

 

8.      A straight line meets two parallel lines at a point A and B respectively and passes through the origin. The equation of the parallel lines are 3x + 3y = 9 and x + y + 3 = 0. Find the ratio in which the origin divides the line segment AB?

a)      1:1

b)     2:1

c)      3:4

d)     4:3

e)     1:2

 

9.      Which of the followings are the coordinates of a square whose sides are parallel to the coordinate axes and is inscribed in a circle with the equation x2 + y2 – 4x + 6y + 5 = 0.

a)      (4,-1)

b)     (-4,-1)

c)      (1,-7)

d)     (4,0)

 

10.   When 27 men work 4 hours per day for 30 days, thay produce 1300units. If 21 men work 10 hours per day, then how many days it will take to produce 1600 units ?

a)      8

b)     28

c)      11

d)     19

 

11.   What is total number of ways of arranging the letters of the word ‘CONFUCTION’ so that the vowels always come together?

a)      24320

b)     40320

c)      28000

d)     40080

e)     20160

 

 

12.   There are five blue, four red, and three white marbles in a bag. Find the number of ways of drawing four marbles from the bag, such that atleast one red marble is included in each draw.

a)      385

b)     425

c)      475

d)     495

e)     515

 

13.   Several six leters words are formed by selecting letters from a set of nine different letters. What is the number of such six letters words in which at least one letter is repeated?

a)      685

b)     8724

c)      12493

d)     470961

e)     5628627

 

 

14.   Following is the performance record of a sales team for the first fie weeks of a calender year

Successful sales made/sale orders cancelled/total number of sales

First week               20/35/55

Second week          18/14/32

Third week              25/15/40

Fourth week           20/10/30

Fifth week               20/15/35

 

According to the chart, during which week was the percentage of sales orders cancelled by the customers the least

a)      First

b)     Second

c)      Third

d)     Fourth

e)     Fifth

 

 

15.   There 16 red and 12 blue containers on a shell. If five containers are selected at a random, then what is the probability that three of them will be red and two will be blue?

a)      41/89

b)     44/117

c)      47/126

d)     48/113

 

16.   In order to participate in a quiz competition seven students are to be selected randomly from a class of 12 girls and 10 boys. If there should be at least five girls in the team, then in how many ways the team can be selected?

a)      43214

b)     44168

c)      45168

d)     45672

e)     46218

 

17.   Three machines A, B, and Cproduce identical items. Of their respective outputs, 5%, 4% and 3% of items are faulty. On a certain day, machine A has produced 25% of the total output, machine B has produced 30% and machine C the remainder. An item is selected at random is found to be faulty. What is the probability that the faulty item is produced by the machine with the highest output?

a)      0.268

b)     0.289

c)      0.355

d)     0.475

 

 

 

18.








19.  



 

 

 

 

20.   What will be the output of the following code snippet?

#include<stdio.h>

Int main()

{ char wish[] = “I want to solve this question” ;

Char *p;

P = wish;

P += 2;

Printf(“%s”,p);

Return 0;

}

 

a)      Want to solve this problem

b)     Ant to solve this problem

c)      To solve this question

d)     Compilation error

 

21.   What will be the output of the following piece of code if ret(10) is called?

Int ret(intnum)

{

While (num>0)

{

Return(num+ret(num-2));

}

Return num;

}

 

a)      20

b)     10

c)      30

d)     55

 

 

22.   In the following code if the partitions are always in the ratio 1:99, then what will be the most appropriate

Quicksort(arr[], low, high)

{

        If (low < high)

        {

              /* pi is partitioning index, arr[pi] is now

                   At right place */

              Pi = partition(arr, low, high);

 

Quicksort(arr, low, pi - 1);

Quicksort(arr, pi + 1, high);

        }

}

 

a)      nlognbase(100/99)

b)     nlognbase(1/99)

c)      nlogbase(99/100)

d)     nlognbase2

 

23.   what will be the output of the following pseudocode?

 

Int [4][3] integers = { {1,2,3,4}, {5,6,7} };

Int x = integers[1][3];

Printf(x);

 

 

a)      7

b)     3

c)      4

d)     Runtime error

 

 

 

24.   What will be the time complexity of the following code?

Fun(int n)

{

While (n>1)

{

n--;

return (n/2);

}

}

 

 

a)      0(log n)

b)     0(n)

c)      0(1)

d)     0(nlogn)

 

 

25.   Consider the following code snippet:

 

Intfoo(intp[], inti, intj)

{

        If(i==j)

             Return0;

        Intk;

        Intmin = INT_MAX;

        Intcount;

   For(k = i; k < j; k++)   {

              Count = foo(p, I, k) +

                             foo(p, k + 1, j) +

                             p[i - 1] * p[k] * p[j];

                if(count < min)

                       min = count;

         }

         Returnmin;4

}

 

 

Given 4 matrices A,B,C,D with dimensions 1x2, 2x1, 1x4, 4x1, respectively. What is the most option

 

a)      A(B(CD))

b)     ((AB)C)D

c)      (AB)(CD)

d)     A((BC)D)

 

26.   What will be the output of the following pseudocode?

 

Char nam[3][10] = {“Maruti”, “BMW”, “Bugati”};

For (inti + 1; i<3; i++) {

Printf(name[i]);

}

 

 

a)      MarutiBMWBugati

b)     BMW

c)      BMWBugati

d)     MarutiBMW

 

 

27.   #include

 

 

Voidfunc(void);

 

Staticint count =s;

Main(){

 

While(count--){

Func();

 

Return0;

}

 

Voidfunc(void){

Staticinti=5;i++;

Printf(“I is %d and count is %d\n”,I, count);

}

 

What would be the 3rd line of output?

 

 

a)      i is 6 and count is 4

b)     i is 7 and count is 3

c)      i is 8 and count is 2

d)     i is 10 and count is 0

 

28.   which of the following code would lead to the desired output:

desired output : 3 2 4

 

a)      #include<stdio.h>

 

Int main()

{

Int a[5]={1,2,3,4,5};

Inti,j,k;

I = ++a[0];

J = a[0]++;

Printf(“%d,%d,%d”,I,j,k);

Return 0;

}

b)     #include<stdio.h>

 

Int main()

{

Int a[5]={1,2,3,4,5};

Inti,j,k;

I = ++a[0];

J = a[0]++;

K = a[i++];

Printf(“%d,%d,%d”,I,j,k);

Return0;

}

c)      #include<stdio.h>

 

Int main()

{

Int a[5]={1,2,3,4,5};

Inti,j,k;

i = ++a[1];

j = a[1]++;

k = a[++i];

printf(“%d,%d,%d”,i,j,k);

return 0;

}

d)     #include<stdio.h>

 

Int main()

{

Int a[5] = {1,2,3,4,5};

Inti,j,k;

I = ++a[0];

J = a[1]++;

K = a[++i];

Printf(“%d,%d,%d”,I,j,k):

Return 0;

}

 

No comments:

Post a Comment