1
GATE CSE 2019
MCQ (Single Correct Answer)
+2
-0.67
Consider the following snapshot of a system running $n$ concurrent processes. Process $i$ is holding $X_i$ instances of a resource $\mathrm{R}, 1 \leq i \leq n$. Assume that all instances of R are currently in use. Further, for all $i$, process $i$ can place a request for at most $Y_i$ additional instances of R while holding the $X_i$ instances it already has. Of the $n$ processes, there are exactly two processes $p$ and $q$ such that $Y_p=Y_q=0$. Which one of the following conditions guarantees that no other process apart from $p$ and $q$ can complete execution?
A
$X_p + X_q < \min \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}$
B
$X_p + X_q < \max \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}$
C
$\min (X_p, X_q) \geq \min \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}$
D
$\min (X_p, X_q) = \max \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}$
2
GATE CSE 2019
Numerical
+2
-0
The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB , and the disk block address is 32 -bits long. The maximum possible file size is (rounded off to 1 decimal place) ___________ GB.
Your input ____
3
GATE CSE 2019
Numerical
+1
-0
Consider the following C program:

        #include < stdio.h >
         int jumble (int x, int y)  {
               x = 2 * x + y ;
               return x ;
         }
         int main ( )  {
               int x=2, y=5 ;
               y = jumble (y, x) ;
               x = jumble (y, x) ;
               printf ("%d \n", x) ;
               return 0 ;
         }


The value printed by the program is ______.
Your input ____
4
GATE CSE 2019
Numerical
+2
-0
Consider the following C program:

       #include < stdio.h >
       int main()
       {
           int a[] = {2, 4, 6, 8, 10} ;
           int i, sum = 0, *b = a + 4 ;
           for (i = 0; i < 5; i++)
                 sum = sum + (*b - i) - *(b - i) ;
           printf ("%d\n", sum) ;
           return 0 ;
        }

The output of the above C program is _________.
Your input ____
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12