Computer Science Gate 2018 Questions



Ques 1Aptitude

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


Ratio and Proportion is the correct answer.




Ques 2Aptitude

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


Algebra is the correct answer.




Ques 3Aptitude

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.


Probability is the correct answer.




Ques 4Aptitude

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


Venn Diagram is the correct answer.




Ques 5Aptitude

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


Geometry is the correct answer.




Ques 6Aptitude

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

a) Meandering
b) Timely
c) Consistent
d) Systematic


English Grammar is the correct answer.




Ques 7Aptitude

"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


English Grammar is the correct answer.




Ques 8Aptitude

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


Number System is the correct answer.




Ques 9Aptitude

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

a) 2880
b) 1440
c) 720
d) 0


Number Series is the correct answer.




Ques 10Automata

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


Context Free Grammar is the correct answer.




Ques 11C

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 12C

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 13C

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


Loops is the correct answer.




Ques 14C

Consider the following C program.

#include<stdio.h>
struct Ournode {
char x, y, z;
};
int main() {
struct Ournode p = {'1', '0', 'a' + 2};
struct Ournode *q = &p;
printf("%c, %c", *((char *)q + 1), *((char *)q + 2));
return 0;
}

The output of this program is:

a) 0, c
b) 0, a+2
c) '0', 'a+2'
d) '0', 'c'


Structure is the correct answer.




Ques 15COA

A processor has 16 integer registers (R0, R1, … , R15) and 64 floating point registers (F0, F1, … , F63). It uses a 2-byte instruction format. There are four categories of instructions: Type-1, Type-2, Type-3, and Type 4. Type-1 category consists of four instructions, each with 3 integer register operands (3Rs). Type-2 category consists of eight instructions, each with 2 floating point register operands (2Fs). Type-3 category consists of fourteen instructions, each with one integer register operand and one floating point register operand (1R+1F). Type-4 category consists of N instructions, each with a floating point register operand (1F). The maximum value of N is _______


a is the correct answer.




Ques 16COA

A 32 - bit wide main memory unit with a capacity of 1 GB is built using 256M X 4-bit DRAM chips. The number of rows of memory cells in the DRAM chip is 214. The time taken to perform one refresh operation is 50 nanoseconds. The refresh period is 2 milliseconds. The percentage (rounded to the closest integer) of the time available for performing the memory read/write operations in the main memory unit is _______ .


a is the correct answer.




Ques 17COA

Consider the following processor design characteristics.

I. Register-to-register arithmetic operations only
II. Fixed-length instruction format
III. Hardwired control unit

Which of the characteristics above are used in the design of a RISC processor?

a) II and III only
b) I and II only
c) I and III only
d) I, II and III


RISC is the correct answer.




Ques 18Computer Network

Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per-second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is _______


a is the correct answer.




Ques 19Computer Network

Consider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the system use the following carrier-sense the medium access protocol. A node that receives a packet to transmit will carrier-sense the medium for 5 units of time. If the node does not detect any other transmission in this duration, it starts transmitting its packet in the next time unit. If the node detects another transmission, it waits until this other transmission finishes, and then begins to carrier-sense for 5 time units again. Once they start to transmit, nodes do not perform any collision detection and continue transmission even if a collision occurs. All transmissions last for 20 units of time. Assume that the transmission signal travels at the speed of 10 meters per unit time in the medium. Assume that the system has two nodes P and Q, located at a distance d meters from each other. P starts transmitting a packet at time t = 0 after successfully completing its carrier-sense phase. Node Q has a packet to transmit at time t = 0 and begins to carrier-sense the medium. The maximum distance d (in meters, rounded to the closest integer) that allows Q to successfully avoid a collision between its proposed transmission and P’s on going transmission is _______


a is the correct answer.




Ques 20Computer Network

Consider an IP packet with a length of 4,500 bytes that includes a 20-byte IPv4 header ans 40-byte TCP header. The packet is forwarded to an IPv4 router that supports a Maximum Transmission Unit (MTU) of 600 bytes. Assume that the length of the IP header in all the outgoing fragments of this packet is 20 bytes. Assume that the fragmentation offset value stored in the first fragment is 0. The fragmentation offset value stored in the third fragment is ______ .


a is the correct answer.




Ques 21Digital Logic

Consider the minterm list form of a Boolean function F given below.

F(P, Q, R, S) = Σm(0, 2, 5, 7, 9, 11) + d(3, 8, 10, 12, 14)


Here, m denotes a minterm and d denotes a don^^t care term. The number of essential prime implicants of the function F is ______ .


a is the correct answer.




Ques 22Discrete Mathematics

Let G be a finite group on 84 elements. The size of a largest possible proper subgroup of G is _______ .


a is the correct answer.




Ques 23Discrete Mathematics

Which one the following is a closed form expression for the generating function of the sequence {an}, where an = 2n + 3 for all n = 0, 1, 2,...?

a) 3/(1-x)2
b) 3x/(1-x)2
c) 2-x/(1-x)2
d) 3-x/(1-x)2


Generating Function is the correct answer.




Ques 24OS

Consider a storage disk with 4 platters (numbered as 0, 1, 2 and 3), 200 cylinders (numbered as 0, 1, … , 199), and 256 sectors per track (numbered as 0, 1, … 255). The following 6 disk requests of the form [sector number, cylinder number, platter number] are received by the disk controller at the same time: [120, 72, 2], [180, 134, 1], [60, 20, 0], [212, 86, 3], [56, 116, 2], [118, 16, 1] Currently head is positioned at sector number 100 of cylinder 80, and is moving towards higher cylinder numbers. The average power dissipation in moving the head over 100 cylinders is 20 milliwatts and for reversing the direction of the head movement once is 15 milliwatts. Power dissipation associated with rotational latency and switching of head between different platters is negligible. The total power consumption in milliwatts to satisfy all of the above disk requests using the Shortest Seek Time First disk scheduling algorithm is ______


a is the correct answer.




Ques 25OS

The size of the physical address space of a processor is 2P bytes. The word length is 2W bytes. The capacity of cache memory is 2N bytes. The size of each cache block is 2M words. For a K-way set-associative cache memory, the length (in number of bits) of the tag field is

a) P − N − log2K
b) P − N + log2K
c) P − N − M − W − log2K
d) P − N − M − W + log2K


Memory Management is the correct answer.




Ques 26OS

Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the corresponding memory page is available in memory, and D units if the memory access causes a page fault. It has been experimental measured that the average time taken for a memory access in the process is X units. Which one of the following is the correct expression for the page fault rate experienced by the process?

a) (D - M)/(X - M)

b) (X - M)/(D - M)

c) (D - X)/(D - M)

d) (X - M)/(D - X)


Demand Paging is the correct answer.