CS and IT GATE 2018 Questions with Answer

Ques 1 Aptitude


In appreciative of social improvement completed in a town, a wealthy philanthropist decided to give gift of Rs. 750 to each male senior citizen and Rs. 1000 for female senior citizens. There are total 300 senior citizens and th 8/9th of total men and 2/3rd of total women claimed the gift. What is amount of money philanthropist paid?

A

15000

B

200000

C

115000

D

151000



Ques 2 Aptitude


If pqr ≠ 0 and p-x = 1/q, q-y = 1/r , r-z = 1/p, what is the value of the product xyz ?

A

-1

B

1/ pqr

C

1

D

pqr



Ques 3 Aptitude


A six sided unbiased die with four green faces and two red faces is rolled seven times. Which of the following combinations is the most likely outcome of the experiment?

A

Three green faces and four red faces.

B

Four green faces and three red faces.

C

Five green faces and two red faces.

D

Six green faces and one red face.



Ques 4 Aptitude


In a party, 60% of the invited guests are male and 40% are female. If 80% of the invited guests attended the party and if all the invited female guests attended, what would be the ratio of males to females among the attendees in the party?

A

2:3

B

1:1

C

3:2

D

2:1



Ques 5 Aptitude


The area of a square is ‘d’. What is the area of the circle which has the diagonal of the square as its diameter?

A

πd

B

πd2

C

(1/4) πd2

D

(1/2) πd



Ques 6 Aptitude


A __________ investigation can sometimes yield new facts, but typically organized once are more successful.

A

Meandering

B

Timely

C

Consistent

D

Systematic



Ques 7 Aptitude


"From where are they bringing their books? _________ bringing _________ books from _________." The words that best fill the blanks in the above sentence are

A

Their, theyre, there

B

Theyre, their, there

C

There, their, theyre

D

Theyre, there,there



Ques 8 Aptitude


What would be the smallest natural number which when divided either by 20 or by 42 or by 76 leaves a remainder ‘7’ in each case is_

A

3047

B

6047

C

7987

D

63847



Ques 9 Aptitude


What is the missing number in the following sequence? 2, 12, 60, 240, 720, 1440, ___,0

A

2880

B

1440

C

720

D

0



Ques 10 Automata


Consider the following languages:

I. {ambncpdq ∣ m + p = n + q, where m, n, p, q ≥ 0}
II. {ambncpdq ∣ m = n and p = q, where m, n, p, q ≥ 0}
III. {ambncpdq ∣ m = n = p and p ≠ q, where m, n, p, q ≥ 0}
IV. {ambncpdq ∣ mn = p + q, where m, n, p, q ≥ 0}


Which of the above languages are context-free?

A

I and IV only

B

I and II only

C

II and III only

D

II and IV only



Ques 11 C Programming


Consider the following program written in pseudo-code. Assume that x and y are integers.

Count (x, y) {
    if (y !=1 ) {
        if (x !=1) {
            print("*");
            Count (x/2, y);
      }
    else {
      y=y-1;
      Count (1024, y);
     }
   }
}

The number of times that the print statement is executed by the call Count(1024, 1024) is _______ .


a is the correct answer.


Ques 12 C Programming


Consider the following C program:

#include<stdio.h>
int counter = 0;
int calc(int a, int b) {
    int c;
    counter++;
    if (b == 3)
       return (a * a * a);
   else {
       c = calc(a, b / 3);
        return (c * c * c);
    }
}
int main() {
   calc(4, 81);
   printf("%d", counter);
}


The output of this program is ________ .


a is the correct answer.


Ques 13 C Programming


Consider the following C code. Assume that unsigned long int type length is 64 bits.

unsigned long int fun(unsigned long int n) {
    unsigned long int i, j = 0, sum = 0;
    for( i = n; i > 1; i = i/2) j++;
        for( ; j > 1; j = j/2) sum++;
            return sum;
}


The value returned when we call fun with the input 240 is

A

4

B

5

C

6

D

40



Unique Visitor Count

Total Unique Visitors

Loading......