GATE 2025 (Session 1) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2025 (Session 1)

65 questions

MCQ 30 · MSQ 13 · NAT 221-mark 30 · 2-mark 35

Questions 26–30 of 65

Q26Binary Search Tree1 markMSQ
Which of the following statement(s) is/are TRUE for any binary search tree (BST) having nn distinct integers?

One or more options are correct.

Q27ALU Data Path and Control Unit1 markMSQ
A partial data path of a processor is given in the figure, where RARA, RBRB, and RZRZ are 32-bit registers. Which option(s) is/are CORRECT related to arithmetic operations using the data path as shown?
RA (32 bit)RB (32 bit) RZ (32 bit) Mux_A Mux_B ALU immediate value32 bit immediate value32 bit Select RA/immediate Select RB/immediate ALU control

One or more options are correct.

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

One or more options are correct.

Q29Process1 markNAT
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 _______. (Answer in integer)

int main()
{
	int x=0,i=0;
	scanf("%d",&x);
	for(i=0; i<20; i++)
	{
		 x = x + 20;
		 printf("%d\n",x);
	}
	return 0;
}

Q30Combination1 markNAT
Let SS be the set of all ternary strings defined over the alphabet {a,b,c}\{a, b, c\}. Consider all strings in SS 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 _______. (Answer in integer)