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

GATE 2015 (Session 1)

65 questions

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

Questions 36–40 of 65

Q37Heap Tree2 marksMCQ−0.67 if wrong
Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.
Array Index Value 1 40 2 30 3 20 4 10 5 15 6 16 7 17 8 8 9 4
Now consider that a value 35 is inserted into this heap. After insertion, the new heap is

Q38Software Engineering2 marksNAT
Consider the following C program segment.
while(first <= last)
{
      if (array[middle] < search)
         first = middle + 1;
      else if (array[middle] == search)
               found = TRUE;
           else last = middle - 1;
      middle = (first + last)/2;
}
if (first > last)  notPresent = TRUE;
The cyclomatic complexity of the program segment is ________.

Q40Propositional Logic2 marksMCQ−0.67 if wrong
The binary operator ≠\neq is defined by the following truth table.
p q p ≠ q 0 0 0 0 1 1 1 0 1 1 1 0
Which one of the following is true about the binary operator ≠\neq?