• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Sudo GATE 2020 Mock I (27 December 2019)

Question 41

Which of the following set of functional dependencies of relation R (ABCD) is not in 3NF ?
  • { AB → C, D → B, AC → D }
  • { C → B, A → B, CD → A, BCD → A }
  • { C → D, CD →A, AB →C, BD →A }
  • None of these

Question 42

A computer system uses 16-bit memory addresses. It has a 2K-byte cache organized in a direct-mapped manner with 64 bytes per cache block. Assume that the size of each memory word is 1 byte. When a program is executed, the processor reads data sequentially from the following word addresses:
128, 144, 2176, 2180, 128, 2176 
All the above addresses are shown in decimal values. Assume that the cache is initially empty. The cache hits ratio occur for for above given addresses is __________ .
  • 0.333
  • 0.666
  • 0.353
  • 0.535

Question 43

Consider the following finite automata:
Which of the following are FALSE?
1. Complement of L(A) does not accept strings that starting from \'a\'.
2. L(A) = {a, b}* - b(a, b)*.
3. DFA for above finite automata has 2 final stats and total 4 states.
4. Minimal DFA has single finale state. 
  • 1 and 3 only
  • 2 and 4 only
  • 2 and 3 only
  • 3 and 4 only

Question 44

Which of the following is not correct logical translation of the following statement ?
"If anyone cheats, everyone suffers."
  • ∀y(∀x cheat(x) → suffer(y))
  • ∀x (cheat(x) → ∀y suffer(y))
  • ∀x∀y (cheat(x) → suffer(y))
  • ∀y ∀x (cheat(x) → suffer(y))

Question 45

Consider the following grammar:
S → A$
A → (AB)
A → ε
B → (A) 
B → x
Which of the following s the correct parse tree for the string?
((x)x)$ 



  • None of these.

Question 46

Match the following List-I and List-II:
List-I List-II
P. Memory Leak 1.
#include 
  
void fun(int x) 
{ 
    if (x == 1) 
       return; 
    x = 6; 
    fun(x); 
} 
  
int main() 
{ 
   int x = 5; 
   fun(x); 
} 
Q. Dangling Pointer 2.
char* func()
{
   char str[10];
   strcpy(str,"Hello!");
   return(str); 
}
R. Stack Overflow 3.
#include < stdlib.h >

  void f() {
    int * ptr = (int * ) malloc(sizeof(int));
    /* Do some work */
    return;
  }
S. Wild Pointer 4.
int main() 
{ 
  int  *p; 
  int a = 10; 
  p = &a;  
  *p = 12; 
} 
  • P - 1, Q - 4, R - 3, S - 2
  • P - 1, Q - 2, R - 3, S - 4
  • P - 3, Q - 4, R - 1, S - 2
  • P - 3, Q - 2, R - 1, S - 4

Question 47

Consider the following matrix for a weighted graph; in what order will Kruskal\'s add edges to the MST?
  a  b  c  d  e  f  g  h
a 0  8  0  0  0  0  0  0
b 8  0  4  2  0  0  0  0
c 0  4  0  11 0  3  0  0
d 0  2  11  0 5  6  10 0
e 0  0  0  5  0  0  0  0
f 0  0  3  6  0  0  0  7
g 0  0  0  10 0  0  0  9
h 0  0  0  0  0  7  9  0
  • b-d, b-c, d-e, c-f, f-h, a-b, g-h
  • c-f, b-d, b-c, d-e, f-h, a-b, g-h
  • b-d, c-f, b-c, d-e, f-h, a-b, g-h
  • b-d, c-f, b-c, d-e, g-h, f-h, a-b

Question 48

Consider the weights 1, 1, 2, 2, 3, 3, 4, 4 to the edges of the graph G and following statements: I. There is a graph G in which unique minimum weight spanning tree is possible in Graph G. II. There is a graph G in which multiple minimum weight spanning trees are possible in Graph G. Which of the following statement(s) is/are correct ?
  • Only I
  • Only II
  • Both I and II
  • Neither I nor II

Question 49

Consider the following statements: I. The number of possible min-heaps containing each value from 7 indistinguishable element is 80. II. A max-heap can be constructed from a binary search tree in Θ(n) time. III. The kth smallest element in a max-heap can be found in O(log n) time. IV. A binary search tree can be constructed from a max-heap in O(n log n) time. Which of the above statements is/are TRUE ?
  • II, III and IV
  • I, II and III
  • I, III and IV
  • I, II and IV

Question 50

Consider the following set of jobs to be scheduled for execution on a single CPU system.
Job    Arrival Time    Size (msec)   Priority
J1             0          10         2 (Silver)
J2             2          8          1 (Gold)
J3             3          3          3 (Bronze)
J4            10          4          2 (Silver)
J5            12          1          3 (Bronze)       
J6            15          4          1 (Gold) 
Which of the following is the correct order for scheduling policies providing the lowest waiting time for this set of jobs?
  • Non-preemptive SJF < FCFS < preemptive priority scheduling < non-preemptive priority scheduling
  • Non-preemptive SJF < FCFS < preemptive priority scheduling < non-preemptive priority scheduling
  • Non-preemptive SJF < preemptive priority scheduling < FCFS < non-preemptive priority scheduling
  • Non-preemptive SJF < preemptive priority scheduling < non-preemptive priority scheduling < FCFS

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion