PREVIOUS YEAR SOLVED PAPERS - GATE 2017 Shift 2

21. Consider the following tables T1 and T2

In table T1, P is the primary key and Q is the foreign key referencing R in table T2 with on delete cascade and on-update cascade. In table T2, R is the primary key and S is the foreign key referencing P in table T1 on-delete set NULL and on-update cascade. In order to delete record 3,8 from table T1, the number of additional records that need to be deleted from table T1 is _____.
Note – Numerical Type question

  • Option : A
  • Explanation :
    As Q refers to R so, deleting 8 from Q won't be an issue, however, S refers P. But as the relationship given is on delete set NULL, 3 will be deleted from T1 and the entry in T2 having 3 in column S will be set to NULL. So, no additional records deleted from table T1
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


22. Which of the following is/are shared by all the threads in a process?
I. Program counter
II. Stack
III. Address space
IV. Registers

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


23. A circular queue has been implemented using a single linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively. Which of the following statements is/are CORRECT for such a circular queue, so that insertion and deletion operation can be performed in O (1) time?
I. Next pointer of front node points to the rear node.
II. Next pointer of rear node points to the front node.

  • Option : B
  • Explanation :
    Next pointer of the front node would point to the second node, if any.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


24. Given the following binary number in 32-bit (single precision) IEEE-754 format:
00111110011011010000000000000000
The decimal value closest to this floating-point number is-

  • Option : C
  • Explanation :
    Sign = 0
    = +ve
    AE= BE-Bias
    = 01111100-01111111
    AE= 11111101
    Here sign of AE is negative so take two's complement of AE = 00000011
    Mantissa: Normal Mantissa = 1.M = 1.1101101
    Data + 1.1101101 x 2-3
    Hence answer is 2.27 x 10-1
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


25. An ER model of a database consists of entity types A and B. These are connected by a relationship R which does not have its own attribute. Under which one of the following conditions, can the relational table for R be merged with that of A?

  • Option : C
  • Explanation :

    Note: only M to N relationship needs exclusive table: If a relationship is 1 to M or M to 1 then that relation could be included in the many side table with the help of foreign key concept.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
GATE 2017 Shift 2