GATE CSE 2018

Question 1
Which one of the following is a closed form expression for the generating function of the sequence \left \{ a_{n} \right \}, where a_{n}=2n+3 for all n = 0, 1, 2,...?
A
\frac{3}{(1-x)^{2}}
B
\frac{3x}{(1-x)^{2}}
C
\frac{2-x}{(1-x)^{2}}
D
\frac{3-x}{(1-x)^{2}}
Engineering Mathematics   Calculus
Question 2
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'
C Programming   Array and Pointer
Question 3
A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let n denote the number of nodes in the queue. Let enqueue be implemented by inserting a new node at the head, and dequeue be implemented by deletion of a node from the tail.

Which one of the following is the time complexity of the most time-efficient implementation of enqueue and dequeue, respectively, for this data structure?
A
\Theta (1), \Theta (1)
B
\Theta (1), \Theta (n)
C
\Theta (n), \Theta (1)
D
\Theta (n), \Theta (n)
Data Structure   Queue
Question 4
Let \bigoplus and \bigodot denote the Exclusive OR and Exclusive NOR operations, respectively. Which one of the following is NOT CORRECT?
A
\overline{P \bigoplus Q}=P\bigodot Q
B
\overline{P} \bigoplus Q=P\bigodot Q
C
\overline{P} \bigoplus \overline{Q}=P\bigoplus Q
D
(P \bigoplus \overline{P})\bigoplus Q=(P\bigodot\overline{P})\bigodot \overline{Q}
Digital Logic   Boolean Algebra
Question 5
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
I and II only
B
II and III only
C
I and III only
D
I, II and III
Computer Organization   Machine Instruction
Question 6
Let N be an NFA with n states. Let k be the number of states of a minimal DFA which is equivalent to N. Which one of the following is necessarily true?
A
k\geqslant 2^{n}
B
k\geqslant n
C
k\leqslant n^{2}
D
k\leqslant 2^{n}
Theory of Computation   Finite Automata
Question 7
The set of all recursively enumerable languages is
A
closed under complementation
B
closed under intersection.
C
a subset of the set of all recursive languages.
D
an uncountable set
Theory of Computation   Recursive Language
Question 8
Which one of the following statements is FALSE?
A
Context-free grammar can be used to specify both lexical and syntax rules.
B
Type checking is done before parsing.
C
High-level language programs can be translated to different Intermediate Representations.
D
Arguments to a function can be passed using the program stack.
Compiler Design   Syntax-directed Translation
Question 9
The following are some events that occur after a device controller issues an interrupt while process L is under execution.
(P) The processor pushes the process status of L onto the control stack.
(Q) The processor finishes the execution of the current instruction.
(R) The processor executes the interrupt service routine.
(S) The processor pops the process status of L from the control stack.
(T) The processor loads the new PC value based on the interrupt.
Which one of the following is the correct order in which the events above occur?
A
QPTRS
B
PTRSQ
C
TRPQS
D
QTPRS
Computer Organization   Interrupt
Question 10
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 experimentally 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)
Operating System   Memory Management
There are 10 questions to complete.

Leave a Comment

Like this FREE website? Please share it among all your friends and join the campaign of FREE Education to ALL.