GATE 2015 (Session 3) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2015 (Session 3)

65 questions

MCQ 45 · NAT 201-mark 30 · 2-mark 35

Questions 51–55 of 65

Q51Transaction2 marksMCQ−0.67 if wrong
Consider the following partial Schedule S involving two transactions T1 and T2. Only the read and the write operations have been shown. The read operation on data item P is denoted by read(P) and the write operation on data item P is denoted by write(P).
Time instance Transaction-id T1 T2 1 read(A) 2 write(A) 3 read(C) 4 write(C) 5 read(B) 6 write(B) 7 read(A) 8 commit 9 read(B) Schedule S
Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?

Q52Systems of Linear Equations2 marksMCQ−0.67 if wrong
If the following system has non-trivial solution,
px+qy+rz=0
qx+ry+pz=0
rx+py+qz=0,
then which one of the following options is TRUE?

Q53Conditional Statement2 marksNAT
Consider the following C program:
#include <stdio.h>
int main( )
{
    int i, j, k = 0;
    j = 2 * 3 / 4 + 2.0 / 5 + 8 / 5;
    k -=  --j;
    for(i = 0; i < 5; i++)
    {
         switch(i + k)
        {
          case 1:
          case 2: printf("\n%d", i+k);
          case 3: printf("\n%d", i+k);
          default: printf("\n%d", i+k);
        }
   }
return 0;
}
The number of times printf statement is executed is ________.

Q54Definite and Improper Integrals2 marksMCQ−0.67 if wrong
If for non-zero x,af(x)+bf(1x)=1x−25x,af(x)+bf\left ( \frac{1}{x} \right )=\frac{1}{x}-25 where a≠ba\neq b then ∫12f(x)dx\int_{1}^{2}f(x)dx is

Q55Minimum Spanning Tree2 marksNAT
Let G be a connected undirected graph of 100 vertices and 300 edges. The weight of a minimum spanning tree of G is 500. When the weight of each edge of G is increased by five, the weight of a minimum spanning tree becomes ________.