GATE CS question library
Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.
Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.
20 on this page
What is the output of the following C code? Assume that the address of is (in decimal) and an integer requires four bytes of memory. int main () { unsigned int x [4] [3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf ("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3); }
Consider the following pseudo code, where and are positive integers. begin q := 0 r := x while r ≥ y do begin r := r - y q := q + 1 end end The post condition that needs to be satisfied after the program terminates is
Suppose is a lattice represented by the following Hasse diagram: For any , not necessarily distinct , and are join and meet of , respectively. Let be the set of all ordered triplets of the elements of . Let …
Consider a max heap, represented by the array: . …
Consider the following C function. int fun1 (int n) { int i, j, k, p, q = 0; for (i = 1; i < n; ++i) { p = 0; for (j = n; j > 1; j = j/2) ++p; for (k = 1; k < p; k = k * 2) ++q; } return q; } Which one of the following most closely approximates the return value of the function ?
= ______.
Suppose that everyone in a group on people wants to communicate secretly with the others using symmetric Key cryptographic system. The communication between any two person should not be decodable by the others in the group. The numbers of keys required in the system as a whole to satisfy the confidentiality requirement is
Consider a LAN with four nodes and . Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmits in the same slot. The probabilities of generation of a frame in a time slot by and are …
In the LU decomposition of the matrix , if the diagonal elements of are both , then the lower diagonal entry of is_________________.
For a set , the power set of is denoted by . If , which of the following options are TRUE?
The binary operator is defined by the following truth table. …
Suppose the following disk request sequence (track numbers) for a disk with tracks is given: Assume that the initial position of the R/W head is on track . The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN …
Consider the following relation: …
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height are
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
A file is organized so that the ordering of the data records is the same as or close to the ordering of data entries in some index. Then that index is called
Which of the following fields of an IP header is NOT modified by a typical IP router?
Consider a -bit Johnson counter with an initial value of The counting sequence of this counter is
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection? If the sequence number of a segment is then the sequence number of the subsequent segment is always If the estimated round trip time at any given point of time is sec, the value of the …
In one of the pairs of protocols given below , both the protocols can use multiple connections between the same client and the server. Which one is that?
