GATE CSE 2022


Q11.

What is printed by the following ANSI C program?#include < stdio.h > int main(int argc, char *argv[]){ char a = 'P'; char b = 'x'; char c = (a & b) + '*'; char d = (a | b) - '-'; char e = (a ^ b) + '+'; printf("%c %c %c \n", c, d, e); return 0; } ASCII encoding for relevant characters is given below
GateOverflow

Q12.

Consider the following languages: \begin{aligned} L_1&= \{a^n wa^n|w \in \{a,b \}^* \} \\ L_2&= \{wxw^R | w,x \in \{a,b \}^*, |w|,|x| \gt 0 \} \end{aligned}Note that w^R is the reversal of the string w. Which of the following is/are TRUE?MSQ
GateOverflow

Q13.

Consider the following languages: \begin{aligned} L_1&= \{ ww|w \in \{a,b \}^* \} \\ L_2&= \{a^nb^nc^m | m,n \geq 0 \} \\ L_3 &= \{a^mb^nc^n|m,n \geq 0 \} \end{aligned}Which of the following statements is/are FALSE?MSQ
GateOverflow

Q14.

Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time t = 0. There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following is NOT possible as CPU burst time (in time units) of these processes?
GateOverflow

Q15.

Consider a 100 Mbps link between an earth station (sender) and a satellite (receiver) at an altitude of 2100 km. The signal propagates at a speed of 3 \times 10^8 m/s. The time taken (in milliseconds, rounded off to two decimal places) for the receiver to completely receive a packet of 1000 bytes transmitted by the sender is
GateOverflow

Q16.

Which of the following statements is/are TRUE with respect to deadlocks?MSQ
GateOverflow

Q17.

Which one of the following is the closed form for the generating function of the sequence \{a_n \}_{n \geq 0} defined below?a_n= \left \{ \begin{matrix} n+1, &n \text{ is odd} \\ 1,& \text{otherwise} \end{matrix} \right.
GateOverflow

Q18.

Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is .
GateOverflow

Q19.

Consider a simple undirected unweighted graph with at least three vertices. If A is the adjacency matrix of the graph, then the number of 3-cycles in the graph is given by the trace of
GateOverflow

Q20.

The following simple undirected graph is referred to as the Peterson graph.Which of the following statements is/are TRUE?MSQ
GateOverflow