Recent Post

GATE-2018 Question Paper with Answer (One marks)

Q.1 Which one of 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
 

Answer :- (D)
 

Q.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'
 

Answer :- (A)

Q.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) θ(1), θ(1)   (B) θ(1), θ(n)   (C) θ(n), θ(1)   (D) θ(n), θ(n)


Answer :- (B)

Q.4 Let ⊕ and ⊙ denote the Exclusive OR and Exclusive NOR operations, respectively.
Which one of the following is NOT CORRECT?
(A) P̅̅̅⊕̅̅̅̅Q̅ = P ⊙ Q
(B) P̅ ⊕ Q = P ⊙ Q
(C) P̅ ⊕ Q̅ = P ⊕ Q
(D) (P ⊕ P̅) ⊕ Q = (P ⊙ P̅) ⊙ Q̅


Answer :- (D) 

 Q.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
 
 
Answer :- (D) 

Q.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 ≥ 2n
(B) k ≥ n 

(C) k ≤ n2
(D) k ≤ 2n

Answer :- (D) 

 Q.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.


Answer :- (B) 

 Q.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.


Answer :- (B) 

Q.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
 
 
Answer :- (A) 

Q.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)


Answer :- (B) 

Q.11 In an Entity-Relationship (ER) model, suppose R is a many-to-one relationship from entity
set E1 to entity set E2. Assume that E1 and E2 participate totally in R and that the cardinality
of E1 is greater than the cardinality of E2.
Which one of the following is true about R?
(A) Every entity in E1 is associated with exactly one entity in E2.
(B) Some entity in E1 is associated with more than one entity in E2.
(C) Every entity in E2 is associated with exactly one entity in E1.
(D) Every entity in E2 is associated with at most one entity in E1.


Answer :- (A) 

 Q.12 Consider the following two tables and four queries in SQL.
              Book (isbn, bname), Stock (isbn, copies)
Query 1:    SELECT B.isbn, S.copies
                  FROM Book B INNER JOIN Stock S
                  ON B.isbn = S.isbn;
Query 2:    SELECT B.isbn, S.copies
                  FROM Book B LEFT OUTER JOIN Stock S
                  ON B.isbn = S.isbn;
Query 3:    SELECT B.isbn, S.copies
                  FROM Book B RIGHT OUTER JOIN Stock S
                  ON B.isbn = S.isbn;
Query 4:    SELECT B.isbn, S.copies
                  FROM Book B FULL OUTER JOIN Stock S
                 ON B.isbn = S.isbn;
Which one of the queries above is certain to have an output that is a superset of the outputs
of the other three queries?
(A) Query 1 (B) Query 2 (C) Query 3 (D) Query 4
 

 Answer :- (D) 

Q.13 Match the following:
                 Field                                 Length in bits
P. UDP Header’s Port Number                I. 48
Q. Ethernet MAC Address                      II. 8
R. IPv6 Next Header                               III. 32
S. TCP Header’s Sequence Number       IV. 16

(A) P-III, Q-IV, R-II, S-I (B) P-II, Q-I, R-IV, S-III
(C) P-IV, Q-I, R-II, S-III (D) P-IV, Q-I, R-III, S-II


Answer :- (C) 

Q.14 Consider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that cwnd stands for the TCP congestion window and MSS denotes
the Maximum Segment Size.
(i) The cwnd increases by 2 MSS on every successful acknowledgment.
(ii) The cwnd approximately doubles on every successful acknowledgement.
(iii) The cwnd increases by 1 MSS every round trip time.
(iv) The cwnd approximately doubles every round trip time.
         Which one of the following is correct?
(A) Only (ii) and (iii) are true (B) Only (i) and (iii) are true
(C) Only (iv) is true (D) Only (i) and (iv) are true
 

Answer :- (C) 
 
Q.15 Two people, P and Q, decide to independently roll two identical dice, each with 6 faces,
numbered 1 to 6. The person with the lower number wins. In case of a tie, they roll the dice repeatedly until there is no tie. Define a trial as a throw of the dice by P and Q. Assume that all 6 numbers on each dice are equip-probable and that all trials are independent. The probability (rounded to 3 decimal places) that one of them wins on the third trial is _____.

Answer :- 0.021 to 0.024

 Q.16 The value of ∫ x cos(x2)dx Ï€/4 0 correct to three decimal places (assuming that Ï€ = 3.14 ) is _____.
Answer :-0.27 to 0.23

 Q.17 Consider a matrixTA uv  where 1 1,2 1u v
. Note that Tv denotes the transpose of v. The largest eigenvalue of
A is _____.

Answer :- 3 to 3
 
 Q.18 The chromatic number of the following graph is _______. 


Answer :- 3 to 3
  
Q.19 Let G be a finite group on 84 elements. The size of a largest possible proper subgroup of G
is ________.


Answer :- 42 to 42


Q.20 The postorder traversal of a binary tree is 8,9,6,7,4,5,2,3,1. The inorder traversal of the same
tree is 8,6,9,4,7,2,5,1,3. The height of a tree is the length of the longest path from the root to
any leaf. The height of the binary tree above is ______.

Answer :- 4 to 4

 Q.21 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 _____.

Answer :-4 to 4

 Q.22 Consider the sequential circuit shown in the figure, where both flip-flops used are positive
edge-triggered D flip-flops.













The number of states in the state transition diagram of this circuit that have a transition back
to the same state on some value of “in” is _____.


Answer :- 2 to 2

Q.23 A 32-bit wide main memory unit with a capacity of 1 GB is built using 256M × 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 __________.

Answer :- 59.0 to 60.0

 Q.24 Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and
released only one at a time. The largest value of K that will always avoid deadlock is ____.

Answer :- 2 to 2

 Q.25 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 _______. 
 


Answer :- 34 to 35

No comments