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
After Rajendra Chola returned from his voyage to Indonesia, he ________ to visit the temple in Thanjavur.
Consider a RISC machine where each instruction is exactly bytes long. Conditional and unconditional branch instructions use PC-relative addressing mode with Offset specified in bytes to the target location of the branch instruction. Further the Offset is always with respect to the address of the next instruction in the program sequence. Consider the …
Let be an array of numbers consisting of a sequence of 's followed by a sequence of 's. The problem is to find the smallest index such that is by probing the minimum number of locations in . The worst case number of probes performed by an optimal algorithm is ____________.
The number of integers between and (both inclusive) that are divisible by or or is ____________ .
Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below. …
The values of parameters for the Stop-and-Wait ARQ protocol are as given below: Bit rate of the transmission channel Mbps. Propagation delay from sender to receiver ms. Time to process a frame ms. Number of bytes in the information frame . Number of bytes in the acknowledge frame . Number of overhead bytes in …
In a RSA cryptosystem, a participant uses two prime numbers and to generate her public and private keys. If the public key of is , then the private key of is __________ .
Consider the following grammar: stmt if expr then expr else expr; stmt | expr term relop term | term term id | number id a | b | c number where relop is a relational operator e.g., refers to the empty statement, and if, then, else …
In a database system, unique timestamps are assigned to each transaction using Lamport's logical clock. Let and be the timestamps of transactions and respectively. Besides, holds a lock on the resource and has requested a conflicting lock on the same resource The following …
Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus. { | u EMP(t[EmpName] = u[EmpName] v …
Recall that Belady's anomaly is that the page-fault rate may increase as the number of allocated frames increases. Now, consider the following statements: : Random page replacement algorithm (where a page chosen at random is replaced) suffers from Belady's anomaly. : LRU page replacement algorithm suffers from Belady's anomaly. Which of the …
Let and be finite alphabets and let be a symbol outside both and . Let be a total function from to . We say is computable if there exists a Turing machine which given an input , always halts with on its tape. Let denote the language …
Consider the following languages over the alphabet . Let and . Which of the following are context-free languages?
Consider the context-free grammars over the alphabet given below. and are non-terminals. The language is
Consider the C functions foo and bar given below: int foo(int val) { int x=0; while(val > 0) { x = x + foo(val--); } return val; } int bar(int val) { int x = 0; while(val > 0) { x= x + bar(val-1); } return val; } Invocations of and will result in:
Consider the following two functions. void fun1(int n) { if(n == 0) return; printf("%d", n); fun2(n - 2); printf("%d", n); } void fun2(int n) { if(n == 0) return; printf("%d", n); fun1(++n); printf("%d", n); } The output printed when is called is
If is a grammar with productions where is the start variable, then which one of the following strings is not generated by ?
Consider a combination of and flip-flops connected as shown below. The output of the flip-flop is connected to the input of the flip-flop and the output of the flip-flop is connected to the input of the flip-flop. Initially, both and are set to (before the …
A computer network uses polynomials over for error checking with bits as information bits and uses as the generator polynomial to generate the check bits. In this network, the message is transmitted as:
Let be real valued square symmetric matrix of rank with Consider the following statements. One eigenvalue must be in The eigenvalue with the largest magnitude must be strictly greater than Which of the above statements about eigenvalues of is/are …
