Computer Science & Information Technology CS1 Specimen Paper 2027

Official GATE 2025 CS1 question paper — 28 multiple-choice questions with answers verified against the official GATE answer key. Original paper published by IIT Roorkee, hosted on the official GATE website. Practice online with instant marking.

GATECS1Subject code CS1202728 questions28 interactive

← All GATE papers

Score: 0 / 28
Q1GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q1] 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.

Q2GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q2] 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.

Q3GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q3] 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?

Q4GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q4] 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?

Q5GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q5] According to the map shown in the figure, which one of the following statements is correct? Note: The figure shown is representative. 1st Main Road Library Canteen Physics Lab Hospital 5th Cross Road Hostels Chemistry Lab N Classrooms W E S

Q6GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q6] “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?

Q7GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q7] 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. P S T Q R

Q8GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q8] 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?

Q9GATE CS1 — General Aptitude1 mark

[GATE 2027 CS1, Q10] 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?

Q10GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q11] 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?

Q11GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q12] Which ONE of the following statements is FALSE regarding the symbol table?

Q12GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q13] Which ONE of the following techniques used in compiler code optimization uses live variable analysis?

Q13GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q14] 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?

Q14GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q15] A schedule of three database transactions 𝑇1 , 𝑇2 , and 𝑇3 is shown. 𝑅𝑖 (𝐴) and 𝑊𝑖 (𝐴) denote read and write of data item 𝐴 by transaction 𝑇𝑖 , 𝑖 = 1,2,3. The transaction 𝑇1 aborts at the end. Which other transaction(s) will be required to be rolled back? 𝑅1 (𝑋) 𝑊1 (𝑌) 𝑅2 (𝑋) 𝑅2 (𝑌) 𝑅3 (𝑌) 𝐴𝐵𝑂𝑅𝑇(𝑇1 )

Q15GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q16] Identify the ONE CORRECT matching between the OSI layers and their corresponding functionalities as shown. OSI Layers Functionalities (a) Network layer (I) Packet routing (b) Transport layer (II) Framing and error handling (c) Datalink layer (III) Host to host communication

Q16GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q17] 𝑔(. ) is a function from 𝐴 to 𝐵, 𝑓(. ) is a function from 𝐵 to 𝐶, and their composition defined as 𝑓(𝑔(. )) is a mapping from 𝐴 to 𝐶. If 𝑓(. ) and 𝑓(𝑔(. )) are onto (surjective) functions, which ONE of the following is TRUE about the function 𝑔(. )?

Q17GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q18] Let 𝐺 be any undirected graph with positive edge weights, and 𝑇 be a minimum spanning tree of 𝐺. For any two vertices, 𝑢 and 𝑣, let 𝑑1 (𝑢, 𝑣) and 𝑑2 (𝑢, 𝑣) be the shortest distances between 𝑢 and 𝑣 in 𝐺 and 𝑇, respectively. Which ONE of the options is CORRECT for all possible 𝐺, 𝑇, 𝑢 and 𝑣?

Q18GATE CS1 — Computer Science1 mark

[GATE 2027 CS1, Q19] Consider the following context-free grammar 𝐺, where 𝑆, 𝐴, and 𝐵 are the variables (non-terminals), 𝑎 and 𝑏 are the terminal symbols, 𝑆 is the start variable, and the rules of 𝐺 are described as: 𝑆 → 𝑎𝑎𝐵 | 𝐴𝑏𝑏 𝐴 → 𝑎 | 𝑎𝐴 𝐵 → 𝑏 | 𝑏𝐵 Which ONE of the languages 𝐿(𝐺) is accepted by 𝐺?

Q19GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q36] 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=210, 1M=220 .]

Q20GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q37] 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 + 25

Q21GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q38] A computer has two processors, 𝑀1 and 𝑀2 . Four processes 𝑃1 , 𝑃2 , 𝑃3 , 𝑃4 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: • 𝑀1 uses priority of execution for the processes as, 𝑃1 > 𝑃3 > 𝑃2 > 𝑃4 , i.e., 𝑃1 and 𝑃4 have highest and lowest priorities, respectively. • 𝑀2 uses priority of execution for the processes as, 𝑃2 > 𝑃3 > 𝑃4 > 𝑃1 , i.e., 𝑃2 and 𝑃1 have highest and lowest priorities, respectively. A process 𝑃𝑖 is scheduled to a processor 𝑀𝑘 , if the processor is free and no other process 𝑃𝑗 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?

Q22GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q39] Consider two relations describing 𝑡𝑒𝑎𝑚𝑠 and 𝑝𝑙𝑎𝑦𝑒𝑟𝑠 in a sports league: • 𝑡𝑒𝑎𝑚𝑠(𝑡𝑖𝑑, 𝑡𝑛𝑎𝑚𝑒): 𝑡𝑖𝑑, 𝑡𝑛𝑎𝑚e are team-id and team-name, respectively • 𝑝𝑙𝑎𝑦𝑒𝑟𝑠(𝑝𝑖𝑑, 𝑝𝑛𝑎𝑚𝑒, 𝑡𝑖𝑑): 𝑝𝑖𝑑, 𝑝𝑛𝑎𝑚𝑒, and 𝑡𝑖𝑑 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 𝑡𝑛𝑎𝑚𝑒 as ′𝑀𝐼′?

Q23GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q40] 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?

Q24GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q41] 1 1 𝐴=[ ] 1 −1 What are the eigenvalues of the matrix 𝐴13 ?

Q25GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q42] Consider the following four variable Boolean function in sum-of-product form 𝐹(𝑏3 , 𝑏2 , 𝑏1 , 𝑏0 ) = ∑(0, 2, 4, 8, 10, 11, 12). where the value of the function is computed by considering 𝑏3 𝑏2 𝑏1 𝑏0 as a 4-bit binary number, where 𝑏3 denotes the most significant bit and 𝑏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 𝐹?

Q26GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q43] Let 𝐺(𝑉, 𝐸) be an undirected and unweighted graph with 100 vertices. Let 𝑑(𝑢, 𝑣) denote the number of edges in a shortest path between vertices 𝑢 and 𝑣 in 𝑉. Let the maximum value of 𝑑(𝑢, 𝑣), 𝑢, 𝑣 ∈ 𝑉 such that 𝑢 ≠ 𝑣, be 30. Let 𝑇 be any breadth- first-search tree of 𝐺. Which ONE of the given options is CORRECT for every such graph 𝐺?

Q27GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q44] Consider the following two languages over the alphabet {𝑎, 𝑏}: 𝐿1 = { 𝛼𝛽𝛼 | 𝛼 ∈ {𝑎, 𝑏}+ AND 𝛽 ∈ {𝑎, 𝑏}+ } 𝐿2 = { 𝛼𝛽𝛼 | 𝛼 ∈ {𝑎}+ AND 𝛽 ∈ {𝑎, 𝑏}+ } Which ONE of the following statements is CORRECT?

Q28GATE CS1 — Computer Science2 marks

[GATE 2027 CS1, Q45] Consider the following two languages over the alphabet {𝑎, 𝑏, 𝑐}, where 𝑚 and 𝑛 are natural numbers. 𝐿1 = {𝑎𝑚 𝑏 𝑚 𝑐 𝑚+𝑛 | 𝑚, 𝑛 ≥ 1} 𝐿2 = {𝑎𝑚 𝑏 𝑛 𝑐 𝑚+𝑛 | 𝑚, 𝑛 ≥ 1} Which ONE of the following statements is CORRECT?

Download the official paper (PDF)

The questions above are our interactive version — answer online, get instant marking and worked solutions. Prefer the original? Download the official GATE Computer Science & Information Technologypaper straight from the exam board.

More papers from GATE (IIT) →

The PDF opens on the exam board's own website — we link to it, we don't host or alter it.

This Computer Science & Information Technology CS1 specimen paper for 2027 is designed to match the style, weighting and difficulty of the real GATE examination. Work through each question, choose an answer, and the full mark-scheme style solution plus an examiner tip will appear. Your answers, correct/incorrect record and past scores are stored locally in your browser, so you can return and pick up where you left off.

Need it on paper? Use Download / Print PDF above to save this paper — questions, worked solutions and examiner tips included — as a PDF you can print or keep offline. Untick “Include worked solutions” first if you want a clean question paper without the answers.