GATE CSE 2023


Question 1
Consider the following statements regarding the front-end and back-end of a compiler.

S1: The front-end includes phases that are independent of the target hardware.
S2: The back-end includes phases that are specific to the target hardware.
S3: The back-end includes phases that are specific to the programming language used in the source code.

Identify the CORRECT option.
A
Only S1 is TRUE.
B
Only S1 and S2 are TRUE.
C
S1, S2, and S3 are all TRUE.
D
Only S1 and S3 are TRUE.
Compiler Design   Intermediate Code Generation
Question 2
Which one of the following sequences when stored in an array at locations A[1], . . . , A[10] forms a max-heap?
A
23, 17, 10, 6, 13, 14, 1, 5, 7, 12
B
23, 17, 14, 7, 13, 10, 1, 5, 6, 12
C
23, 17, 14, 6, 13, 10, 1, 5, 7, 15
D
23, 14, 17, 1, 10, 13, 16, 12, 7, 5
Data Structure   Heap Tree


Question 3
Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let DLLdel be another function that deletes a node in a doubly-linked list given a pointer to the node and a pointer to the head of the list.
Let n denote the number of nodes in each of the linked lists. Which one of the following choices is TRUE about the worst-case time complexity of SLLdel and DLLdel?
A
SLLdel is O(1) and DLLdel is O(n)
B
Both SLLdel and DLLdel are O(log(n))
C
Both SLLdel and DLLdel are O(1)
D
SLLdel is O(n) and DLLdel is O(1)
Data Structure   Link List
Question 4
Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {s, p, q, r}, with s being the start state and p being the only final state.

Which one of the following regular expressions correctly describes the language accepted by A?
A
1(0^*11)^*
B
0(0 + 1)^*
C
1(0 + 11)^*
D
1(110^*)^*
Theory of Computation   Regular Expression
Question 5
The Lucas sequence L_n is defined by the recurrence relation:
L_n=L_{n-1}+L_{n-2}, \; for \; n\geq 3,
with L_1=1 \; and \; L_2=3
Which one of the options given is TRUE?
A
L_n=\left ( \frac{1+\sqrt{5}}{2} \right )^n+\left ( \frac{1-\sqrt{5}}{2} \right )^n
B
L_n=\left ( \frac{1+\sqrt{5}}{2} \right )^n - \left ( \frac{1-\sqrt{5}}{3} \right )^n
C
L_n=\left ( \frac{1+\sqrt{5}}{2} \right )^n+\left ( \frac{1-\sqrt{5}}{3} \right )^n
D
L_n=\left ( \frac{1+\sqrt{5}}{2} \right )^n- \left ( \frac{1-\sqrt{5}}{2} \right )^n
Discrete Mathematics   Recurrence




There are 5 questions to complete.

Gate 2023 CSE question paper and solution. GATE 2023 Answer Key.

Practice Previous year GATE CSE Topicwise questions with detail Solution.

1 thought on “GATE CSE 2023”

Leave a Comment