GATE 2024 (Session 1) CS Mock Test
General Instructions
- The test lasts 180 minutes. The timer above the question shows the time left, and the test is submitted automatically when it reaches zero.
- The question palette shows the status of each question:
1 You have not visited the question yet. 2 You have not answered the question. 3 You have answered the question. It will be evaluated. 4 You have not answered the question but marked it for review. 5 You have answered the question and marked it for review. It will also be evaluated. - Save & Next saves your answer and moves to the next question. Mark for Review & Next saves it, marks it for review and moves on. Clicking a number in the palette moves to that question without saving the current answer.
- MCQ: one correct option; a wrong answer costs 1/3 of the marks for a 1-mark question and 2/3 for a 2-mark one. MSQ: one or more correct options, all of them needed; no negative marks. NAT: type a number with the on-screen keypad; no negative marks.
- A scientific calculator, like the one in GATE, opens from the calculator icon next to the timer.
- Your answers are kept in this browser only. If you close the page, you can resume until the time runs out.
ⓘ Tick the box above to start.
Question No. 1
If '' denotes increasing order of intensity, then the meaning of the words [dry arid parched] is analogous to [diet fast _____].
Which one of the given options is appropriate to fill the blank?
Which one of the given options is appropriate to fill the blank?
If two distinct non-zero real variables and are such that is proportional to then the value of
Consider the following sample of numbers:
9, 18, 11, 14, 15, 17, 10, 69, 11, 13
The median of the sample is
9, 18, 11, 14, 15, 17, 10, 69, 11, 13
The median of the sample is
The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins is
For positive non-zero real variables and , if
then, the value of is
then, the value of is
In the given text, the blanks are numbered (i)-(iv). Select the best match for all the blanks.
Steve was advised to keep his head ___(i)___ before heading __(ii)__ to bat; for, while he had a head __(iii)__ batting, he could only do so with a cool head s __(iv)__ his shoulders
Steve was advised to keep his head ___(i)___ before heading __(ii)__ to bat; for, while he had a head __(iii)__ batting, he could only do so with a cool head s __(iv)__ his shoulders
A rectangular paper sheet of dimensions 54cm x 4cm is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A cube whose surface area is equal to the area of the sheet is also taken.
Then, the ratio of the volume of the cylindrical tube to the volume of the cube is
Then, the ratio of the volume of the cylindrical tube to the volume of the cube is
The pie chart presents the percentage contribution of different macronutrients to a typical 2,000 kcal diet of a person.
The typical energy density (kcal/g) of these macronutrients is given in the table.
The total fat (all three types), in grams, this person consumes is
The typical energy density (kcal/g) of these macronutrients is given in the table.
| Macronutrient | Energy density (kcal/g) |
| Carbohydrates | 4 |
| Proteins | 4 |
| Unsaturated fat | 9 |
| Saturated fat | 9 |
| Trans fat | 9 |
The total fat (all three types), in grams, this person consumes is
A rectangular paper of 20cm x 8cm is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The perimeter of the final folded sheet (in cm) is
The least number of squares to be added in the figure to make AB a line of symmetry is
Let be a function such that , where is the set of all real numbers. The set of all points where is NOT differentiable is
The product of all eigenvalues of the matrix is
Consider a system that uses 5 bits for representing signed integers in 2's complement format. In this system, two integers and are represented as and . Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?
Consider a permutation sampled uniformly at random from the set of all permutations of for some . Let be the event that 1 occurs before 2 in the permutation, and the event that 3 occurs before 4 . Which one of the following statements is TRUE?
Which one of the following statements is FALSE?
A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user's computer in some order.
(i) HTTP GET request for the index page
(ii) DNS request to resolve the web server's name to its IP address
(iii) HTTP GET request for an image object
(iv) TCP SYN to open a connection to the web server
Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer ?
(i) HTTP GET request for the index page
(ii) DNS request to resolve the web server's name to its IP address
(iii) HTTP GET request for an image object
(iv) TCP SYN to open a connection to the web server
Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer ?
Given an integer array of size , we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm is
Consider the following C program:
#include <stdio.h>
int main(){
int a = 6;
int b = 0;
while(a < 10) {
a = a / 12 + 1;
a += b;}
printf("%d", a);
return 0;}
Which one of the following statements is CORRECT?Consider the following C program:
#include <stdio.h>
void fX();
int main(){
fX();
return 0;}
void fX(){
char a;
if((a=getchar()) != '\n')
fX();
if(a != '\n')
putchar(a);} Assume that the input to the program from the command line is 1234 followed by a newline character. Which one of the following statements is CORRECT?Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER diagrams CORRECTLY represents S?
In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
Which of the following statements about a relation R in first normal form (1NF) is/are TRUE ?
Let be two regular languages and a language which is not regular. Which of the following statements is/are always TRUE?
Which of the following statements about threads is/are TRUE?
Which of the following process state transitions is/are NOT possible?
Which of the following is/are Bottom-Up Parser(s)?
Let and be two events in a probability space with , and . Which of the following statements is/are TRUE?
Consider the circuit shown below where the gates may have propagation delays. Assume that all signal transitions occur instantaneously and that wires have no delays. Which of the following statements about the circuit is/are CORRECT?
TCP client P successfully establishes a connection to TCP server . Let denote the sequence number in the SYN sent from to . Let denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?
Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the following statements about forwarding is/are CORRECT?
Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?
Let and be non-empty finite sets such that there exist one-to-one and onto functions (i) from to and (ii) from to . The number of possible values of is ___
Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below.
The value of the expression as per the above rules is _____
The value of the expression as per the above rules is _____
The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________
Consider the following two relations, and :
The total number of tuples obtained by evaluating the following expression is ____
The total number of tuples obtained by evaluating the following expression is ____
Consider a network path between nodes and via router . Node sends a file of size bytes to via this path by splitting the file into chunks of bytes each. Node sends these chunks one after the other without any wait time between the successive chunk transmissions. Assume that the size of extra headers added to these chunks is negligible, and that the chunk size is less than the MTU.
Each of the links and has a bandwidth of , and negligible propagation latency. Router immediately transmits every packet it receives from to , with negligible processing and queueing delays. Router can simultaneously receive on link and transmit on .
Assume P starts transmitting the chunks at time . Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which receives all the chunks of the file?
Each of the links and has a bandwidth of , and negligible propagation latency. Router immediately transmits every packet it receives from to , with negligible processing and queueing delays. Router can simultaneously receive on link and transmit on .
Assume P starts transmitting the chunks at time . Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which receives all the chunks of the file?
Consider the following syntax-directed definition (SDD).
Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.val)?
Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.val)?
Consider the following grammar , with as the start symbol. The grammar has three incomplete productions denoted by (1), (2), and (3).
The set of terminals is . The FIRST and FOLLOW sets of the different non-terminals are as follows.
Which one of the following options CORRECTLY fills in the incomplete productions?
The set of terminals is . The FIRST and FOLLOW sets of the different non-terminals are as follows.
Which one of the following options CORRECTLY fills in the incomplete productions?
Consider the following pseudo-code.
Which of of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively?
Which of of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively?
Consider the following two threads and that update two shared variables and . Assume that initially . Though context switching between threads can happen at any time, each statement of or is executed atomically without interruption.
Which one of the following options lists all the possible combinations of values of and after both and finish execution?
Which one of the following options lists all the possible combinations of values of and after both and finish execution?
An array is heapified. Which one of the following options represents the first three elements in the heapified array?
Consider the following recurrence relation:
Which one of the following options is CORRECT?
Which one of the following options is CORRECT?
Consider a binary min-heap containing 105 distinct elements. Let be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of is
The symbol indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
Let be a directed graph and a depth first search (DFS) spanning tree in that is rooted at a vertex . Suppose is also a breadth first search (BFS) tree in , rooted at . Which of the following statements is/are TRUE for every such graph and tree ?
Consider the following read-write schedule over three transactions , and , where the subscripts in the schedule indicate transaction IDs:
Which of the following transaction schedules is/are conflict equivalent to ?
Which of the following transaction schedules is/are conflict equivalent to ?
Consider a Boolean expression given by .
Which of the following statements is/are CORRECT?
Which of the following statements is/are CORRECT?
Consider the following C function definition.
int f(int x, int y) {
for (int i=0; i < y; i++) {
x=x+x+y;
}
return x;
} Which of the following statements is/are TRUE about the above function?Let be any matrix, where . Which of the following statements is/are TRUE about the system of linear equations ?
Consider the 5 -state DFA accepting the language shown below. For any string let be the number of in and be the number of 1 's in .
Which of the following statements is/are FALSE?
Which of the following statements is/are FALSE?
The chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. Let be any graph with vertices and chromatic number . Which of the following statements is/are always TRUE?
Consider the operators and defined by , for positive integers. Which of the following statements is/are TRUE?
Consider two set-associative cache memory architectures: WBC, which uses the write back policy, and WTC, which uses the write through policy. Both of them use the LRU (Least Recently Used) block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?
Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is ____
The baseline execution time of a program on a 2 GHz single core machine is 100 nanoseconds (ns). The code corresponding to 90% of the execution time can be fully parallelized. The overhead for using an additional core is 10 ns when running on a multicore system. Assume that all cores in the multicore system run their share of the parallelized code for an equal amount of time.
The number of cores that minimize the execution time of the program is _______
The number of cores that minimize the execution time of the program is _______
A given program has 25% load/store instructions. Suppose the ideal CPI (cycles per instruction) without any memory stalls is 2. The program exhibits 2% miss rate on instruction cache and 8% miss rate on data cache. The miss penalty is 100 cycles. The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e., with NO data or instruction cache misses) is _________
Consider the following code snippet using the fork() and wait() system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors.
int x = 3;
while(x > 0) {
fork();
printf("hello");
wait(NULL);
x--;
} The total number of times the printf statement is executed is ___Consider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination IP address matches the prefix. The notation "" in a prefix indicates a subnet mask with the most significant bits set to 1.
This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205. The number of packets forwarded via the next hop router is
This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205. The number of packets forwarded via the next hop router is
Let be a context-free grammar in Chomsky Normal Form with and containing 10 variable symbols including the start symbol . The string is derivable from . The number of steps (application of rules) in the derivation is _____
The number of edges present in the forest generated by the DFS traversal of an undirected graph with 100 vertices is 40 . The number of connected components in is ____
Consider the following two regular expressions over the alphabet :
The total number of strings of length less than or equal to 5 , which are neither in nor in , is ____
The total number of strings of length less than or equal to 5 , which are neither in nor in , is ____
Consider a memory management system that uses a page size of . Assume that both the physical and virtual addresses start from 0. Assume that the pages , and are stored in the page frames , and , respectively. The physical address (in decimal format) corresponding to the virtual address (in decimal format) is ____
A bag contains 10 red balls and 15 blue balls. Two balls are drawn randomly without replacement. Given that the first ball drawn is red, the probability (rounded off to 3 decimal places) that both balls drawn are red is ____
Consider a digital logic circuit consisting of three 2-to-1 multiplexers M1, M2, and M3 as shown below. and are inputs of . and are inputs of . , and are select lines of , and , respectively.
For an instance of inputs , and , the number of combinations of that give the output is _____
For an instance of inputs , and , the number of combinations of that give the output is _____
Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is _____
GATE 2024 (Session 1) CS Mock Test: your result
Question-wise review
The timer is still running. Close this window to return to the questions.
The timer is still running while you read the paper.
Submit the test?
You cannot change your answers after submitting.