GATE 2019 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2019

65 questions

MCQ 41 · NAT 241-mark 30 · 2-mark 35

Questions 31–35 of 65

Q31Group Theory1 markNAT
The value of 351  mod  53^{51} \;mod \;5 is _____

Q32Probability Theory1 markNAT
Two numbers are chosen independently and uniformly at random from the set {1, 2, ..., 13}. The probability (rounded off to 3 decimal places) that their 4-bit (unsigned) binary representations have the same most significant bit is ___________

Q33Process Synchronization1 markNAT
Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100.
P1 D = D + 20 P2 D = D – 50 P3 D = D + 10
The process are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y-X is __________.

Q34Array and Pointer1 markNAT
Consider the following C program:

#include <stdio.h>
 int main(){
  int arr[] = {1,2,3,4,5,6,7,8,9,0,1,2,5}, *ip = arr + 4;
  printf("%d\n", ip[1]);
  return 0;
}
The number that will be displayed on execution of the program is _________ .

Q35Divide and Conquer1 markNAT
Consider a sequence of 14 elements: A = [-5, -10, 6, 3, -1, -2, 13, 4, -9, -1, 4, 12, -3, 0]. The sequence sum S(i,j)=∑k=ijA[k]S(i,j)=\sum_{k=i}^{j}A[k]. Determine the maximum of S(i,j), where 0≤i≤j<140 \leq i \leq j \lt 14. (Divide and conquer approach may be used). Answer:______