Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Test  >  GATE Computer Science Engineering(CSE) 2027 Mock Test Series  >  Sample GATE Mock Test - Computer Science And IT (CS/IT) - Computer Science Engineering (CSE) MCQ

GATE Computer Science Engineering(CSE) 2027 Sample Mock Test - And IT (CS/IT)


Full Mock Test & Solutions: Sample GATE Mock Test - Computer Science And IT (CS/IT) (65 Questions)

You can boost your Computer Science Engineering (CSE) 2026 exam preparation with this Sample GATE Mock Test - Computer Science And IT (CS/IT) (available with detailed solutions).. This mock test has been designed with the analysis of important topics, recent trends of the exam, and previous year questions of the last 3-years. All the questions have been designed to mirror the official pattern of Computer Science Engineering (CSE) 2026 exam, helping you build speed, accuracy as per the actual exam.

Mock Test Highlights:

  • - Format: Multiple Choice Questions (MCQ)
  • - Duration: 180 minutes
  • - Total Questions: 65
  • - Analysis: Detailed Solutions & Performance Insights
  • - Sections covered: General Aptitude, Computer Science & IT

Sign up on EduRev for free and get access to these mock tests, get your All India Rank, and identify your weak areas to improve your marks & rank in the actual exam.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 1

I _____ made arrangements had I _____informed earlier.

Detailed Solution: Question 1

The sentence uses the third conditional (could have + past participle) for hypothetical situations in the past.

  • 'Could have made' is correct because it expresses a possibility that did not happen.
  • 'Been informed' correctly uses the past participle after 'been.'

This structure conveys regret or hypothetical scenarios about past events.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 2

A rectangular room having dimensions 3.74 m x 5.78 m is required to be tiled using minimum number of identical square tiles. The number of such tiles and area of each tile (in cm2) is given by;

Detailed Solution: Question 2

In this question, we need to find the HCF of 374 and 578 which is 34. We can look at 374 = 34 x 11 and 578 = 34 x 17. This gives the number of square tiles required to cover the entire room is 11 x 17 = 187 and area of each such tile is 342 = 1156 cm2.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 3

In the following sentence, certain parts are underlined and marked P, Q, and R. One of the parts may contain an error or may not be acceptable in standard written communication. Select the part containing an error. Choose D if there is no error.

The student corrected all the errors (P) that the instructor marked (Q) on the answer book (R).

Detailed Solution: Question 3

There is no error in any part of the sentence. The word 'that' in Q is correctly used as a relative pronoun, and all other parts (P and R) are grammatically correct.

Therefore, the correct answer is:

  • D: No error.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 4

4 taps marked as T1, T2, T3 and T4 can fill a tank in 8 hours,12 hours, 16 hours and 24hours respectively. We have to fill up 2 identical tanks with 2 out of these 4 taps connected to tank 1 and remaining two taps connected to tank 2 so that the ratio of time taken to fill tank 1 and tank 2 is 2:3. so identify one of the pair of taps?

Detailed Solution: Question 4

Let us assume the capacity of the tank to be 48 units (48 being LCM of 8, 12, 16 and 24). This leads us to get the rate of filing of T1 to 4 as 6, 4, 3 and 2 units per hour.

Taking pairs of taps, we find that T1 + T2 will take 48/10 whereas the remaining pair will take 48/5 hours leading to the ratio of time taken to fill up 2 tanks as 5:10 which is not the required ratio.

Taking T1 and T3, the time taken is 48/9 and the time taken for the other tank is 48/6 leading to the required ratio as 2:3.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 5

Given below is information related to installed capacity and generation of electricity in India for a specific year:

The closet integral value of capacity utilization for the entire country in the year under consideration is ____%.

[Capacity utilization is the ratio of Electricity generated per hour and installed capacity. Assume that all plants work 365 days a year for 24 hours per day].

Detailed Solution: Question 5

Total installed capacity = 33.3 million kW and total power generated = 119.3 billion kWh

Percentage utilization   which gives nearest integer value as 41%.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 6

12 years ago, age of a father was 4 times of that of his son. 6 years later age of father would be twice of that of son then what is present age of son?

Detailed Solution: Question 6

Let the ages of father and son 12 years ago were F and S respectively. Then A/Q,


Present age of son  x+ 12 = 9+12 = 21 yesrs

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 7

A water tank of capacity 6000 liters is connected to 2 taps ‘A’ and ‘B’. Water flows from these 2 taps at 90 liters per minute and 60 liters per minute respectively. To fill this empty tank, first tap ‘A’ is opened for some time and once it is closed, tap ‘B’ is opened till the tank is full taking a total of 90 minutes. What is the difference in the time (in minutes) for which the taps are opened to fill the tank?

Detailed Solution: Question 7

Let x and y be the time for which tap ‘A’ and ‘B’ are opened

We have x + y = 90 … (i)

90x + 60y = 6000 … (ii)

Solving (i) and (ii), gives x = 20 and y = 70.

 ⇒  Difference in the duration for which taps ‘A' and ‘B’ are opened = 70 – 20 = 50 minutes.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 8

Two trains from Delhi to Ranchi and from Ranchi to Delhi started at the same time. Due to fog in winter season, after crossing each other, they took 16 hr and 9 hr respectively to complete their journey. If the speed of train going to Ranchi was 45 km/h, what was the speed of train going to Delhi?

Detailed Solution: Question 8

Let them meet at X after t hours and speed of train 2 be s kmph as shown in figure below

Train 1 is shown above the line and Train 2 is shown below the line

Distance travelled by train 1 before meeting = Distance travelled by train 2 after meeting

45*t = 9*s   .... i

Also Distance travelled by train 2 before meeting = Distance travelled by train 1 after meeting

st = 45*16 .... ii

Using eq i ;

t= s/5

Putting in eq ii ;

s^2 / 5 = 45*16

s = 60 kmph

OR

Short trick:

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 9

Chinnaswamy is driving to pick up his son from school on a Saturday which is a half day. On his way to school, he crossed a church which is 1/5th of the way to school at 9:50 hours and exactly 10 minutes later, he went past a temple which is 1/3rd of the way to school. The time after 10:00 hours at which he reaches his son’s school is ____ minutes.

Detailed Solution: Question 9

Since we are given time to cross a point which is 1/5th of the way and 1/3rd of the way, we can rewrite them as 3/15th and 5/15th of the way which implies that 2/15th of the way was covered in 10 minutes.

This means that the entire route was covered in 10 × 15/2 = 75 minutes (each 1/15th part is covered in 75/15 = 5 minutes) leading to time of arrival at school as 9:50 – 15 + 75 = 10: 50 hours.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 10

A group of 3000 students, which includes 1750 girls, in a school are engaged in exactly one of the 5 activities as per details given below in the table. What is the difference in the number of boys opting for craft and dancing when compared with drawing and swimming?

Detailed Solution: Question 10

Total number of boys opting for craft and dancing = 365 + 370 = 735

Total number of boys opting for drawing and swimming = 140 + 235 = 375

Required difference = 735 - 375 =  360

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 11

Which of the following is not the disc scheduling algorithm.

Detailed Solution: Question 11

In operating systems, seek time is very important. Since all device requests are linked in queues, the seek time is increased causing the system to slow down. Disk Scheduling Algorithms are used to reduce the total seek time of any request.

TYPES OF DISK SCHEDULING ALGORITHMS

Although there are other algorithms that reduce the seek time of all requests, I will only concentrate on the following disk scheduling algorithms:

First Come-First Serve (FCFS)

Shortest Seek Time First (SSTF)

Elevator (SCAN) 

Circular SCAN (C-SCAN)

LOOK

C-LOOK.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 12

For slow and inefficient I/O peripherals, the interrupt mechanism to be designed must be fast enough. The best possible choice for interrupt handling would be;

Detailed Solution: Question 12

Vectored interrupts are the fastest. Slow and inefficient peripherals are not able to provide device identification number or ISR address. Best option is to have ISR at a fixed address. So for a n-bit CPU, ISR of peripheral attached to vector x will be at x*8.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 13

What is the time complexity to construct binary search tree when inorder and postorder traversal of tree is given?

Detailed Solution: Question 13

For each node in preorder linear search in the order traversal gives left subtree and right subtree.

Time complexity =O(n2)

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 14

The different bus arbitration techniques are daisy chaining, polling and independent requesting. The bus grant and bus request lines are only assumed as control lines. For n requesting devices, the number of control lines for daisy chaining, polling and independent requesting are respectively;

Detailed Solution: Question 14

For daisy chaining, there is a single bus request line and bus grant line which is passed through each of the devices. In polling, there is log2(n) bit polling number for the sequence maintaining I/O devices. Bus is granted using a poll count. Thus log2(n) lines needed to maintain poll count. Bus request line is single. So total no of control lines = log2(n)+1. For independent requesting separate bus request and bus grant line for each I/o device. Thus 2n control lines needed.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 15

Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?

Detailed Solution: Question 15

Deadlock occur if each and every process holds one resource and request resource of other process such that circular wait condition get satisfied. Let A, B, C be these processes holding one process each.

*Answer can only contain numeric values
Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 16

Assume that source S and destination D are connected through two routers. Also there exists a gateway between these two routers. Let 'x' be the number of times a packet visits transport layer, 'y' be the number of times a packet visits network layer and 'z' be the number of times a packet visits data link layer during transmission from source to destination. Then calculate x+2y+3z = __________


Detailed Solution: Question 16

At source , packet visits all the layer once before getting transmitted.

At router R1 , it will go upto the network layer because router is a networking device.

At gateway G1 , it will go upto transport layer because gateway is an all layer switch who works on transport layer.

At router R2 , it will go upto network layer.

At destination , packet will once again visit all the layers.

Hence

A - Application Layer

P - Presentation Layer

S - Session Layer

T - Transport Layer

N - Network Layer

D - Data Link Layer

P - Physical Layer

Hence , from figure

x = 3 y= 6 z = 8

so, x + 2y + 3z = 3 + 12 + 24 = 39

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 17

A student want to prove a relation between the “gradeup” and “gaterank”. If he prove that gradeup is reducible to “gaterank” and “gaterank” is decidable then which of the following is true? (Assume gradeup & gaterank are two problems)

Detailed Solution: Question 17

gradeup ≤ gaterank and

gaterank is decidable.

If gaterank is decidable, then gradeup is also decidable.

So option (a) is correct.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 18

Which of the following is functionality complete set?

Detailed Solution: Question 18

NOT and OR can implement NOR (universal gate). Therfore {NOT, OR} is functionally complete. NOR and NAND are designated as universal logic gates because using any one of them we can implement all the logic gates.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 19

Consider the following dependencies in a database

D → A   

A → E

N → R 

R → N

C → I

(R, C) → G

The relation (R, N, D, A) is

Detailed Solution: Question 19

  1. Identify Functional Dependencies in the Relation:

    • Relevant FDs: D → A, N → R, R → N.
    • Other FDs are ignored as they involve attributes not in the relation.
  2. Find Candidate Keys:

    • The attributes D, N, and R are key candidates.
    • Candidate keys: (D, N) and (D, R).
  3. Check for 2NF:

    • D → A is a partial dependency (A depends only on part of the candidate key D, N).
    • Not in 2NF.

Since there is a partial dependency (for example, D determines A) and the candidate key involves a combination of attributes, the relation is only in first normal form (1NF) but not in second normal form (2NF).

 

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 20

If L1 is DCFL and L2 is CFL , then which statement is true:

Detailed Solution: Question 20

*Answer can only contain numeric values
Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 21

Consider the matrix

Find the eigenvalue of A for which the normalized eigen vector is given by;


Detailed Solution: Question 21

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 22

Consider the three problems :

  • Equivalence
  • Ambiguity
  • Regularity

Detailed Solution: Question 22

For regular language

1) Equivalence: it can be checked by developed product automate for XOR function.

if XOR = O ⇒ equal else not.

2) Ambiguity: Ambiguity is decidable for regular languages & grammar since they are deterministic in nature.

3) Regularity: it is the trivial problem.

For context free language

⇒ it is not closed in any of those problems.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 23

For the matrix 
 ONE of the normalized eigen vector is given as;

Detailed Solution: Question 23


Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 24

IPv4 addressing system already gives information about network and host. Along with the Internet Protocol address of host, subnet mask is also needed by the routers inorder to direct the packet to intended network. Host doesn’t redirect packets, then Why does host need subnet mask?

Detailed Solution: Question 24

We know Subnet mask is needed by routers (stored in routing table) inorder to direct the packet to intended network. But how will host know whether the packet belongs to its own network, whether to send the packet to router or not. For this reason, even host needs the Subnet mask.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 25

Consider the following BST.

Its pre-order and post-order are inserted in two separate arrays(arrays having same starting index) of same size in traversal sequence. How many elements will have same index numbers in the both the arrays?

Detailed Solution: Question 25

(A) is the correct answer.

A Pre-order traversal visits nodes in the following order:

25, 15, 10, 4, 12, 22, 18, 24, 50, 35, 31, 44, 70, 66, 90

A Post-order traversal visits nodes in the following order:

4, 12, 10, 18, 24, 22, 15, 31, 44, 35, 66, 90, 70, 50, 25

Hence 4 elements are having same index numbers in both the arrays.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 26

Consider two relations R1 and R2 given below:

How many tuples are there in relation (Natural join) R1 R2?

Detailed Solution: Question 26

Explanation:

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 27

In the spanning tree shown, what will be the minimum cost?

Detailed Solution: Question 27

A is correct.

The graph has 6 vertices and 5 edges; since the graph is connected and edges = vertices - 1, it is already a tree and therefore a spanning tree.

A spanning tree's cost is the sum of the weights of its edges.

5 + 5 + 4 + 6 + 3 = 23

Therefore the minimum possible cost (the cost of the spanning tree) is 23; option A.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 28

Identify the true statements

I. Maintaining connection semantics between two directly connected nodes is done by network layer.

II. Recovering lost packet between two directly connected nodes is done by transport layer.

III. Recovering lost packets between two nodes separated by multiple hops is done by data link control.

IV. Arbitration is done between multiple nodes attached to a single medium to resolve conflicts.

Detailed Solution: Question 28

The correct statement are.

1.  Recovering lost packet between two directly connected nodes is done by data link layer.

2. Recovering lost packet between two nodes separated by multiple hops is done by transport layer.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 29

Find the output of the following program.

int main()

{

int i = _1_abc(10);

printf("%d\n", --i);

}

int _1_abc(int i)

{

return(i++);

}

Detailed Solution: Question 29

Correct option: C

The function _1_abc receives its parameter by value. The statement return(i++) uses the post-increment operator, so the current value of the local i (which is 10) is returned and then the local i is incremented.

The increment inside the function affects only the local parameter; it does not change the variable in the caller.

Thus the variable i in main becomes 10. The expression --i is a pre-decrement, which decreases i to 9 and then yields 9 to printf.

Therefore the program prints 9, corresponding to option C.

Sample GATE Mock Test - Computer Science And IT (CS/IT) - Question 30

Consider the following grammar -

S -> ABa/BAc

A -> d/e/epsilon

B -> f/epsilon

Which of the following is true regarding the FIRST() & FOLLOW() function of LL(1) parser?

Detailed Solution: Question 30

FIRST() is calculated by the following rules-

i. FIRST(TERMINAL)=TERMINAL

ii. FIRST(EPSILON)=EPSILON

iii. If we have to calculate FIRST(ABC) and FIRST(A) contain epsilon then also include FIRST(BC)

FOLLOW() is calculated by the following rules-

i. If A is start symbol then FOLLOW(A) also contain $

ii. Eg- B -> DACE

C -> a/b

FOLLOW(A)=FOLLOW(CE) = FIRST(C) = {a,b}

iii. Eg- B ->DA or B->DAC

C-> epsilon

FOLLOW(A)=FOLLOW(B)

Now coming to question , answer is - FIRST(S) = d,e,f,a,c

FOLLOW(S)= $

FOLLOW(A)= c,f,a

View more questions
56 docs|215 tests
Information about Sample GATE Mock Test - Computer Science And IT (CS/IT) Page
In this test you can find the Exam questions for Sample GATE Mock Test - Computer Science And IT (CS/IT) solved & explained in the simplest way possible. Besides giving Questions and answers for Sample GATE Mock Test - Computer Science And IT (CS/IT), EduRev gives you an ample number of Online tests for practice
Download as PDF