GATE · Computer Science and Information Technology · 2025 Set 1Practice Mode
Score:0/100(0 attempted)

General Aptitude

Q1General Aptitude · 1 mark · MCQ

Ravi had ______ younger brother who taught at ______ university. He was widely regarded as ______ honorable man. Select the option with the correct sequence of articles to fill in the blanks.

Q2General Aptitude · 1 mark · MCQ

The CEO's decision to downsize the workforce was considered myopic because it sacrificed long-term stability to accommodate short-term gains. Select the most appropriate option that can replace the word "myopic" without changing the meaning of the sentence.

Q3General Aptitude · 1 mark · MCQ

The average marks obtained by a class in an examination were calculated as 30.8. However, while checking the marks entered, the teacher found that the marks of one student were entered incorrectly as 24 instead of 42. After correcting the marks, the average becomes 31.4. How many students does the class have?

Q4General Aptitude · 1 mark · MCQ

Consider the relationships among P, Q, R, S, and T:
• P is the brother of Q.
• S is the daughter of Q.
• T is the sister of S.
• R is the mother of Q.
The following statements are made based on the relationships given above.
(1) R is the grandmother of S.
(2) P is the uncle of S and T.
(3) R has only one son.
(4) Q has only one daughter.
Which one of the following options is correct?

Q5General Aptitude · 1 mark · MCQ

According to the map shown in the figure, which one of the following statements is correct? [Note: The figure shown is representative.]

Question 5
Q6General Aptitude · 2 marks · MCQ

"I put the brown paper in my pocket along with the chalks, and possibly other things. I suppose every one must have reflected how primeval and how poetical are the things that one carries in one's pocket: the pocket-knife, for instance the type of all human tools, the infant of the sword. Once I planned to write a book of poems entirely about the things in my pocket. But I found it would be too long: and the age of the great epics is past."
(From G.K. Chesterton's "A Piece of Chalk")
Based only on the information provided in the above passage, which one of the following statements is true?

Q7General Aptitude · 2 marks · MCQ

In the diagram, the lines QR and ST are parallel to each other. The shortest distance between these two lines is half the shortest distance between the point P and line QR. What is the ratio of the area of the triangle PST to the area of the trapezium SQRT? [Note: The figure shown is representative.]

Question 7
Q8General Aptitude · 2 marks · MCQ

A fair six-faced dice, with the faces labelled '1', '2', '3', '4', '5', and '6', is rolled thrice. What is the probability of rolling '6' exactly once?

Q9General Aptitude · 2 marks · MCQ

A square paper, shown in figure (I), is folded along the dotted lines as shown in the figures (II) and (III). Then a few cuts are made as shown in figure (IV). Which one of the following patterns will be obtained when the paper is unfolded? [Note: The figures shown are representative.]

Question 9
Q10General Aptitude · 2 marks · MCQ

A shop has 4 distinct flavors of ice-cream. One can purchase any number of scoops of any flavor. The order in which the scoops are purchased is inconsequential. If one wants to purchase 3 scoops of ice-cream, in how many ways can one make that purchase?

Computer Science and Information Technology

Q11Computer Science and Information Technology · 1 mark · MCQ

Suppose a program is running on a non-pipelined single processor computer system. The computer is connected to an external device that can interrupt the processor asynchronously. The processor needs to execute the interrupt service routine (ISR) to serve this interrupt. The following steps (not necessarily in order) are taken by the processor when the interrupt arrives:
(i) The processor saves the content of the program counter.
(ii) The program counter is loaded with the start address of the ISR.
(iii) The processor finishes the present instruction.
Which ONE of the following is the CORRECT sequence of steps?

Q12Computer Science and Information Technology · 1 mark · MCQ

Which ONE of the following statements is FALSE regarding the symbol table?

Q13Computer Science and Information Technology · 1 mark · MCQ

Which ONE of the following techniques used in compiler code optimization uses live variable analysis?

Q14Computer Science and Information Technology · 1 mark · MCQ

Consider a demand paging memory management system with 32-bit logical address, 20-bit physical address, and page size of 2048 bytes. Assuming that the memory is byte addressable, what is the maximum number of entries in the page table?

Q15Computer Science and Information Technology · 1 mark · MCQ

A schedule of three database transactions T1, T2, and T3 is shown. Ri(A)R_i(A) and Wi(A)W_i(A) denote read and write of data item A by transaction TiT_i, i=1,2,3i = 1,2,3. The transaction T1T_1 aborts at the end. Which other transaction(s) will be required to be rolled back? Schedule: R1(X)R_1(X) W1(Y)W_1(Y) R2(X)R_2(X) R2(Y)R_2(Y) R3(Y)R_3(Y) ABORT(T1)ABORT(T_1)

Q16Computer Science and Information Technology · 1 mark · MCQ

Identify the ONE CORRECT matching between the OSI layers and their corresponding functionalities as shown.

Question 16
Q17Computer Science and Information Technology · 1 mark · MCQ

g(.)g(.) is a function from A to B, f(.)f(.) is a function from B to C, and their composition defined as f(g(.))f(g(.)) is a mapping from A to C. If f(.)f(.) and f(g(.))f(g(.)) are onto (surjective) functions, which ONE of the following is TRUE about the function g(.)?g(.)?

Q18Computer Science and Information Technology · 1 mark · MCQ

Let G be any undirected graph with positive edge weights, and T be a minimum spanning tree of G. For any two vertices, uu and vv, let d1(u,v)d_1(u, v) and d2(u,v)d_2(u, v) be the shortest distances between uu and vv in G and T, respectively. Which ONE of the options is CORRECT for all possible G, T, u and v?

Q19Computer Science and Information Technology · 1 mark · MCQ

Consider the following context-free grammar G, where S, A, and B are the variables (non-terminals), a and b are the terminal symbols, S is the start variable, and the rules of G are described as:
S \to aaB | Abb,
A \to a | aA,
B \to b | bB.
Which ONE of the languages L(G) is accepted by G?

Q20Computer Science and Information Technology · 1 mark · MCQ

Consider the following recurrence relation: T(n)=2T(n1)+n2nT(n) = 2T(n - 1) + n2^n for n>0n > 0, T(0)=1T(0) = 1. Which ONE of the following options is CORRECT?

Q21Computer Science and Information Technology · 1 mark · MSQ

Consider the following B+ tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the B+ tree. Which of the following options(s) is/are CORRECT?

Question 21
Q22Computer Science and Information Technology · 1 mark · MSQ

Consider the 3-way handshaking protocol for TCP connection establishment. Let the three packets exchanged during the connection establishment be denoted as P1, P2, and P3, in order. Which of the following option(s) is/are TRUE with respect to TCP header flags that are set in the packets?

Q23Computer Science and Information Technology · 1 mark · MSQ

Consider the given system of linear equations for variables x and y, where k is a real-valued constant: x+ky=1x + ky = 1 and kx+y=1kx + y = -1. Which of the following option(s) is/are CORRECT?

Q24Computer Science and Information Technology · 1 mark · MSQ

Let X be a 3-variable Boolean function that produces output as '1' when at least two of the input variables are '1'. Which of the following statement(s) is/are CORRECT, where a, b, c, d, e are Boolean variables?

Q25Computer Science and Information Technology · 1 mark · MSQ

The number -6 can be represented as 1010 in 4-bit 2's complement representation. Which of the following is/are CORRECT 2's complement representation(s) of -6?

Q26Computer Science and Information Technology · 1 mark · MSQ

Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?

Q27Computer Science and Information Technology · 1 mark · MSQ

A partial data path of a processor is given in the figure, where RA, RB, and RZ are 32-bit registers. Which option(s) is/are CORRECT related to arithmetic operations using the data path as shown?

Question 27
Q28Computer Science and Information Technology · 1 mark · MSQ

A regular language L is accepted by a non-deterministic finite automaton (NFA) with n states. Which of the following statement(s) is/are FALSE?

Q29Computer Science and Information Technology · 1 mark · NAT

Suppose in a multiprogramming environment, the following C program segment is executed. A process goes into I/O queue whenever an I/O related operation is performed. Assume that there will always be a context switch whenever a process requests for an I/O, and also whenever the process returns from an I/O. The number of times the process will enter the ready queue during its lifetime (not counting the time the process enters the ready queue when it is run initially) is ___.

Question 29
Q30Computer Science and Information Technology · 1 mark · NAT

Let S be the set of all ternary strings defined over the alphabet {a, b, c}. Consider all strings in S that contain at least one occurrence of two consecutive symbols, that is, "aa", "bb" or "cc". The number of such strings of length 5 that are possible is ______.

Q31Computer Science and Information Technology · 1 mark · NAT

Consider the given function f(x)={ax+bfor x<1x3+x2+1for x1f(x) = \begin{cases} ax + b & \text{for } x < 1 \\ x^3 + x^2 + 1 & \text{for } x \geq 1 \end{cases}. If the function is differentiable everywhere, the value of b must be ______ (rounded off to one decimal place).

Q32Computer Science and Information Technology · 1 mark · NAT

A box contains 5 coins: 4 regular coins and 1 fake coin. When a regular coin is tossed, the probability P(head) = 0.5 and for a fake coin, P(head) = 1. You pick a coin at random and toss it twice, and get two heads. The probability that the coin you have chosen is the fake coin is ______ (rounded off to two decimal places).

Q33Computer Science and Information Technology · 1 mark · NAT

The pseudocode of a function fun () is given below: Let A[0, ...,29] be an array storing 30 distinct integers in descending order. The number of swap operations that will be performed, if the function fun () is called with A[0, ...,29] as argument, is ______.

Question 33
Q34Computer Science and Information Technology · 1 mark · NAT

The output of the given C program is ______.

Question 34
Q35Computer Science and Information Technology · 1 mark · NAT

The height of any rooted tree is defined as the maximum number of edges in the path from the root node to any leaf node. Suppose a Min-Heap T stores 32 keys. The height of T is ______.

Q36Computer Science and Information Technology · 2 marks · MCQ

Consider a memory system with 1M bytes of main memory and 16K bytes of cache memory. Assume that the processor generates 20-bit memory address, and the cache block size is 16 bytes. If the cache uses direct mapping, how many bits will be required to store all the tag values? [Assume memory is byte addressable, 1K=2101K = 2^{10}, 1M=2201M = 2^{20}.]

Q37Computer Science and Information Technology · 2 marks · MCQ

A processor has 64 general-purpose registers and 50 distinct instruction types. An instruction is encoded in 32 bits. What is the maximum number of bits that can be used to store the immediate operand for the given instruction?
ADD R1, #25 // R1 = R1 + 25ADD\ R1,\ \#25\ \text{// R1 = R1 + 25}

Q38Computer Science and Information Technology · 2 marks · MCQ

A computer has two processors, M1M_1 and M2M_2. Four processes P1, P2, P3, P4 with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these are the only processes in the system. The scheduler uses non-preemptive priority scheduling, with priorities decided as follows:
M1M_1 uses priority of execution for the processes as, P1>P3>P2>P4P_1 > P_3 > P_2 > P_4, i.e., P1P_1 and P4P_4 have highest and lowest priorities, respectively.
M2M_2 uses priority of execution for the processes as, P2>P3>P4>P1P_2 > P_3 > P_4 > P_1, i.e., P2P_2 and P1P_1 have highest and lowest priorities, respectively.
A process PiP_i is scheduled to a processor MkM_k, if the processor is free and no other process PjP_j is waiting with higher priority. At any given point of time, a process can be allocated to any one of the free processors without violating the execution priority rules. Ignore the context switch time. What will be the average waiting time of the processes in milliseconds?

Q39Computer Science and Information Technology · 2 marks · MCQ

Consider two relations describing teams and players in a sports league:
• teams(tid, tname): tid, tname are team-id and team-name, respectively
• players(pid, pname, tid): pid, pname, and tid denote player-id, player-name and the team-id of the player, respectively.
Which ONE of the following tuple relational calculus queries returns the name of the players who play for the team having tname as 'MI'?

Q40Computer Science and Information Technology · 2 marks · MCQ

A packet with the destination IP address 145.36.109.70 arrives at a router whose routing table is shown. Which interface will the packet be forwarded to?

Question 40
Q41Computer Science and Information Technology · 2 marks · MCQ

Let A be a 2×22 \times 2 matrix as given. A=[1111]A = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}. What are the eigenvalues of the matrix A13A^{13}?

Q42Computer Science and Information Technology · 2 marks · MCQ

Consider the following four variable Boolean function in sum-of-product form F(b3,b2,b1,b0)=(0,2,4,8,10,11,12)F(b_3, b_2, b_1, b_0) = \sum(0, 2, 4, 8, 10, 11, 12), where the value of the function is computed by considering b3b2b1b0b_3b_2b_1b_0 as a 4-bit binary number, where b3b_3 denotes the most significant bit and b0b_0 denotes the least significant bit. Note that there are no don't care terms. Which ONE of the following options is the CORRECT minimized Boolean expression for F?

Q43Computer Science and Information Technology · 2 marks · MCQ

Let G (V, E) be an undirected and unweighted graph with 100 vertices. Let d(u, v) denote the number of edges in a shortest path between vertices u and v in V. Let the maximum value of d(u, v), u, v ∈ V such that u ≠ v, be 30. Let T be any breadth-first-search tree of G. Which ONE of the given options is CORRECT for every such graph G?

Q44Computer Science and Information Technology · 2 marks · MCQ

Consider the following two languages over the alphabet {a, b}:
L1={αβαα{a,b}+ AND β{a,b}+}L_1 = \{\alpha\beta\alpha | \alpha \in \{a,b\}^+ \text{ AND } \beta \in \{a,b\}^+\} and
L2={αβαα{a}+ AND β{a,b}+}L_2 = \{\alpha\beta\alpha | \alpha \in \{a\}^+ \text{ AND } \beta \in \{a,b\}^+\}. Which ONE of the following statements is CORRECT?

Q45Computer Science and Information Technology · 2 marks · MCQ

Consider the following two languages over the alphabet {a, b, c}, where m and n are natural numbers:
L1={ambmcm+nm,n1}L_1 = \{a^mb^mc^{m+n} | m, n \geq 1\}
L2={ambncm+nm,n1}L_2 = \{a^mb^nc^{m+n} | m, n \geq 1\}.
Which ONE of the following statements is CORRECT?

Q46Computer Science and Information Technology · 2 marks · MSQ

Which of the following statement(s) is/are TRUE while computing First and Follow during top down parsing by a compiler?

Q47Computer Science and Information Technology · 2 marks · MSQ

Consider a relational schema team(name, city, owner), with functional dependencies {name → city, name → owner}. The relation team is decomposed into two relations, t1(name, city) and t2(name, owner). Which of the following statement(s) is/are TRUE?

Q48Computer Science and Information Technology · 2 marks · MSQ

Which of the following predicate logic formulae/formula is/are CORRECT representation(s) of the statement: "Everyone has exactly one mother"? The meanings of the predicates used are:
• mother(y, x): y is the mother of x
• noteq(x, y): x and y are not equal

Q49Computer Science and Information Technology · 2 marks · MSQ

A = {0, 1, 2, 3, ... } is the set of non-negative integers. Let F be the set of functions from A to itself. For any two functions, f1,f2Ff_1, f_2 \in F, we define (f1f2)(n)=f1(n)+f2(n)(f_1 \odot f_2)(n) = f_1(n) + f_2(n) for every number n in A. Which of the following is/are CORRECT about the mathematical structure (F, \odot)?

Q50Computer Science and Information Technology · 2 marks · MSQ

Consider the following deterministic finite automaton (DFA) defined over the alphabet, ={a,b}\sum = \{a,b\}. Identify which of the following language(s) is/are accepted by the given DFA.

Question 50
Q51Computer Science and Information Technology · 2 marks · NAT

A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 4 bytes). Suppose a file of 1M bytes needs to be stored in the disk. Assume, 1K=2101K = 2^{10} and 1M=2201M = 2^{20}. The amount of space in bytes that will be wasted due to internal fragmentation is ______.

Q52Computer Science and Information Technology · 2 marks · NAT

Refer to the given 3-address code sequence. This code sequence is split into basic blocks. The number of basic blocks is ______.

Question 52
Q53Computer Science and Information Technology · 2 marks · NAT

A computer has a memory hierarchy consisting of two-level cache (L1 and L2) and a main memory. If the processor needs to access data from memory, it first looks into L1 cache. If the data is not found in L1 cache, it goes to L2 cache. If it fails to get the data from L2 cache, it goes to main memory, where the data is definitely available. Hit rates and access times of various memory units are shown in the figure. The average memory access time in nanoseconds (ns) is ________. (rounded off to two decimal places)

Question 53
Q54Computer Science and Information Technology · 2 marks · NAT

In optimal page replacement algorithm, information about all future page references is available to the operating system (OS). A modification of the optimal page replacement algorithm is as follows:
The OS correctly predicts only up to next 4 page references (including the current page) at the time of allocating a frame to a page.
A process accesses the pages in the following order of page numbers:
1, 3, 2, 4, 2, 3, 1, 2, 4, 3, 1, 4.
If the system has three memory frames that are initially empty, the number of page faults that will occur during execution of the process is ______.

Q55Computer Science and Information Technology · 2 marks · NAT

Consider the following database tables of a sports league: . The value returned by the given SQL query is ______.

Question 55
Q56Computer Science and Information Technology · 2 marks · NAT

Suppose a 5-bit message is transmitted from a source to a destination through a noisy channel. The probability that a bit of the message gets flipped during transmission is 0.01. Flipping of each bit is independent of one another. The probability that the message is delivered error-free to the destination is ______ (rounded off to three decimal places).

Q57Computer Science and Information Technology · 2 marks · NAT

Suppose a message of size 15000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum transmission unit (MTU) as shown in the figure, including IP header. The number of fragments that will be delivered to the destination is ________ . (Answer in integer)

Question 57
Q58Computer Science and Information Technology · 2 marks · NAT

Consider a probability distribution given by the density function P(x)={Cx2for 1x40for x<1 or x>4P(x) = \begin{cases} Cx^2 & \text{for } 1 \leq x \leq 4 \\ 0 & \text{for } x < 1 \text{ or } x > 4 \end{cases}. The probability that xx lies between 2 and 3, i.e., P(2x3)P(2 \leq x \leq 3) is ______ (rounded off to three decimal places).

Q59Computer Science and Information Technology · 2 marks · NAT

Consider a finite state machine (FSM) with one input X and one output f, represented by the given state transition table. The minimum number of states required to realize this FSM is ______.

Question 59
Q60Computer Science and Information Technology · 2 marks · NAT

Consider the given sequential circuit designed using D-Flip-flops. The circuit is initialized with some value (initial state). The number of distinct states the circuit will go through before returning back to the initial state is ______.

Question 60
Q61Computer Science and Information Technology · 2 marks · NAT

The value printed by the given C program is ______.

Question 61
Q62Computer Science and Information Technology · 2 marks · NAT
Question 62
Q63Computer Science and Information Technology · 2 marks · NAT

Consider the following C program: The value printed by the given C program is ______.

Question 63
Q64Computer Science and Information Technology · 2 marks · NAT

The maximum value of x such that the edge between the nodes B and C is included in every minimum spanning tree of the given graph is ______.

Question 64
Q65Computer Science and Information Technology · 2 marks · NAT

In a double hashing scheme, h1(k)=kmod11h_1(k) = k \mod 11 and h2(k)=1+(kmod7)h_2(k) = 1 + (k \mod 7) are the auxiliary hash functions. The size m of the hash table is 11. The hash function for the i-th probe in the open address table is [h1(k)+ih2(k)]modm[h_1(k) + i \cdot h_2(k)] \mod m. The following keys are inserted in the given order: 63, 50, 25, 79, 67, 24. The slot at which key 24 gets stored is ______.