Computer Science & Information Technology (CS) 2023 [Session 2]
Review the key details, then start the test when you are ready. You can also open the full package to see related papers.
Paper pattern & analysis
Available question types, difficulty and classifications for this paper.
Topic distribution
Subtopic distribution
Difficulty distribution
Question type distribution
Practise paper questions
Choose your answer to check it. Log in to view the explanation. For a timed attempt and result, start the exam.
(By word meaning)
If \(F_6 = 37\), and \(F_7 = 60\), then what is \(F_1\) ?
Given this information, which one of the following statements can be inferred with certainty?
Looking at the surface of a smooth 3-dimensional object from the outside, which one of the following options is TRUE?
Based only on the information provided above, which one of the following statements can be logically inferred with certainty?
\[f(t) = 0.01 t^2\]
\[g(t) = 4 t\]
where \(0 < t < \infty\).
Now consider the following two statements:
(i) For some \(t > 0\), \(g(t) > f(t)\).
(ii) There exists a \(T\), such that \(f(t) > g(t)\) for all \(t > T\).
Which one of the following options is TRUE?
(i) Once on the terrace, on her way to her small room in the corner, she notices the man right away.
(ii) She begins to pant by the time she has climbed all the stairs.
(iii) Mina has bought vegetables and rice at the market, so her bags are heavy.
(iv) He was leaning against the parapet, watching the traffic below.

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.
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?
Which one of the following regular expressions correctly describes the language accepted by \(\mathcal{A}\)?

\(L_n = L_{n-1} + L_{n-2}, \quad \text{for } n \geq 3,\)
with \(L_1 = 1\) and \(L_2 = 3\).
Which one of the options given is TRUE?
Which one of the following is the best hashing strategy to counteract the adversary?
Match the functional equivalence of this circuit to one of the following options.


\[\int_{-3}^{3} \int_{-2}^{2} \int_{-1}^{1} (4x^2y - z^3) \, dz \, dy \, dx\]
is __________ . (Rounded off to the nearest integer)
A particular number is written as 132 in radix-4 representation. The same number in radix-5 representation is __________.
The total execution time for executing 100 instructions on this processor is __________ ns.
In an alternative implementation, the system uses interrupts instead of polling. An interrupt is raised for every keystroke. It takes a total of 1 ms for servicing an interrupt and processing a keystroke. Let T2 denote the fraction of a second spent in servicing the interrupt and processing a keystroke.
The ratio T1 / T2 is __________ . (Rounded off to one decimal place)
#include<stdio.h> int funcp(){ static int x = 1; x++; return x; } int main(){ int x,y; x = funcp(); y = funcp()+x; printf("%d\n", (x+y)); return 0; }
int main() { f1(); f2(2); f3(); return(0); } int f1() { return(1); } int f2(int X) { f3(); if (X==1) return f1(); else return (X*f2(X-1)); } int f3() { return(5); }
Which one of the following options represents the activation tree corresponding to the main function?
Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?

incr() { wait(s); X = X+1; signal(s); } decr() { wait(s); X = X-1; signal(s); }
There are 5 threads each invoking incr once, and 3 threads each invoking decr once, on the same shared variable X. The initial value of X is 10.
Suppose there are two implementations of the semaphore s, as follows:
I-1: s is a binary semaphore initialized to 1.
I-2: s is a counting semaphore initialized to 2.
Let V1, V2 be the values of X at the end of execution of all the threads with implementations I-1, I-2, respectively.
Which one of the following choices corresponds to the minimum possible values of V1, V2, respectively?
\[ S \rightarrow aSb \mid X \] \[ X \rightarrow aX \mid Xb \mid a \mid b \, \]
where S and X are non-terminals, and a and b are terminal symbols. The starting non-terminal is S.
Which one of the following statements is CORRECT?
Which one of the following options correctly describes the language accepted by \(P\)?

/C-code ;assembly-code (; indicates comments)
int a[10], b[10], i; ;r1-r5 are 32-bit integer registers
// int is 32-bit ;initialize r1=0, r2=10
for (i=0; i a[i] = b[i] * 8; L01: jeq r1, r2, end ;if(r1==r2) goto end
L02: lw r5, 0(r4) ;r5 L03: shl r5, r5, U1 ;r5 L04: sw r5, 0(r3) ;Memory[r3+0] L05: add r3, r3, U2 ;r3 L06: add r4, r4, U3
L07: add r1, r1, 1
L08: jmp U4 ;goto U4
L09: end
Which one of the following options is a CORRECT replacement for operands in the position (U1, U2, U3, U4) in the above assembly code?
The input memory addresses (IA11-IA0), in decimal, for the starting locations (Addr=0) of each block (indicated as X1, X2, X3, X4 in the figure) are among the options given below. Which one of the following options is CORRECT?

Which one of the given values of (Q1, Q2, Q3) can NEVER be obtained with this digital circuit?

Which one of the following set of values of (X0, X1, X2, X3, X4, X5, X6, X7) will realise the Boolean function \overline{A} + \overline{A} \overline{C} + A \overline{B} C?

P=0xC1800000 and Q=0x3F5C2EF4.
Which one of the following corresponds to the product of these numbers (i.e., P × Q), represented in the IEEE-754 single precision format?
Let A be a priority queue for maintaining a set of elements. Suppose A is implemented using a max-heap data structure. The operation EXTRACT-MAX(A) extracts and deletes the maximum element from A. The operation INSERT(A,key) inserts a new element key in A. The properties of a max-heap are preserved at the end of each of these operations.
When A contains n elements, which one of the following statements about the worst case running time of these two operations is TRUE?
Consider the C function foo and the binary tree shown.
typedef struct node { int val; struct node *left, *right; } node; int foo(node *p) { int retval; if (p == NULL) return 0; else { retval = p->val + foo(p->left) + foo(p->right); printf("%d ", retval); return retval; } }When foo is called with a pointer to the root node of the given binary tree, what will it print?

Let \( U = \{1, 2, \ldots, n\} \), where \( n \) is a large positive integer greater than 1000. Let \( k \) be a positive integer less than \( n \). Let \( A, B \) be subsets of \( U \) with \( |A| = |B| = k \) and \( A \cap B = \emptyset \). We say that a permutation of \( U \) separates \( A \) from \( B \) if one of the following is true.
- All members of \( A \) appear in the permutation before any of the members of \( B \).
- All members of \( B \) appear in the permutation before any of the members of \( A \).
How many permutations of \( U \) separate \( A \) from \( B \)?
Let \( f : A \to B \) be an onto (or surjective) function, where \( A \) and \( B \) are nonempty sets. Define an equivalence relation \( \sim \) on the set \( A \) as
\[ a_1 \sim a_2 \text{ if } f(a_1) = f(a_2) , \]
where \( a_1, a_2 \in A \). Let \( \mathcal{E} = \{ [x] : x \in A \} \) be the set of all the equivalence classes under \( \sim \). Define a new mapping \( F : \mathcal{E} \to B \) as
\[ F([x]) = f(x), \quad \text{for all the equivalence classes } [x] \text{ in } \mathcal{E}. \]
Which of the following statements is/are TRUE?
Which of the following is/are valid lengths of the Sequence Number field in the myTCP header?
Define a binary operation \(\Delta\) on \(2^{X}\) as follows:
\[ A \Delta B = (A - B) \cup (B - A) \]
Let \(H = (2^{X}, \Delta)\). Which of the following statements about H is/are correct?
Suppose in a web browser, you click on the www.gate-2023.in URL. The browser cache is empty. The IP address for this URL is not cached in your local host, so a DNS lookup is triggered (by the local DNS server deployed on your local host) over the 3-tier DNS hierarchy in an iterative mode. No resource records are cached anywhere across all DNS servers.
Let RTT denote the round trip time between your local host and DNS servers in the DNS hierarchy. The round trip time between the local host and the web server hosting www.gate-2023.in is also equal to RTT. The HTML file associated with the URL is small enough to have negligible transmission time and negligible rendering time by your web browser, which references 10 equally small objects on the same web server.
Which of the following statements is/are CORRECT about the minimum elapsed time between clicking on the URL and your browser fully rendering it?
Which of the following statements is/are TRUE?
Function_1
while n > 1 do
for i = 1 to n do
x = x + 1;
end for
n = ⌊n/2⌋;
end while
Function_2
for i = 1 to 100 * n do
x = x + 1;
end for
Let f1(n) and f2(n) denote the number of times the statement “x = x + 1” is executed in Function_1 and Function_2, respectively.
Which of the following statements is/are TRUE?
for \(i = 1, \ldots, n\)
\(\text{color}(v_i) \leftarrow \min\{j \in \mathbb{N} : \text{ no neighbour of } v_i \text{ is colored } j\}\)
Which of the following statements is/are TRUE?
If \(\emptyset\) denotes the empty set, then the cardinality of \(\mathcal{B}(\emptyset)\) is __________.
int D[128][128];
Demand paging is used for allocating memory and each physical page frame holds 512 elements of the array D. The Least Recently Used (LRU) page-replacement policy is used by the operating system. A total of 30 physical page frames are allocated to a process which executes the following code snippet:
for (int i = 0; i
for (int j = 0; j
D[j][i] *= 10;
The number of page faults generated during the execution of this code snippet is __________.
The value of L is ______
I: push the elements of \(a\) from \(a_0\) to \(a_5\) in that order into \(S\).
II: enqueue the elements of \(a\) from \(a_0\) to \(a_5\) in that order into \(Q\).
III: pop an element from \(S\).
IV: dequeue an element from \(Q\).
V: pop an element from \(S\).
VI: dequeue an element from \(Q\).
VII: dequeue an element from \(Q\) and push the same element into \(S\).
VIII: Repeat operation VII three times.
IX: pop an element from \(S\).
X: pop an element from \(S\).
The top element of \(S\) after executing the above operations is ______
\(\begin{align*} N &\to I \# F & N.val = I.val + F.val \\ I &\to I_1 B & I.val = (2 \cdot I_1.val) + B.val \\ I &\to B & I.val = B.val \\ F &\to B F_1 & F.val = \frac{1}{2} (B.val + F_1.val) \\ F &\to B & F.val = \frac{1}{2} B.val \\ B &\to \mathbf{0} & B.val = \mathbf{0}.val \\ B &\to \mathbf{1} & B.val = \mathbf{1}.val \end{align*}\)
The value computed by the translation scheme for the input string
\[10\#011\]
is ______. (Rounded off to three decimal places)
| rollNum | name | gender | marks |
|---|---|---|---|
| 1 | Naman | M | 62 |
| 2 | Aliya | F | 70 |
| 3 | Aliya | F | 80 |
| 4 | James | M | 82 |
| 5 | Swati | F | 65 |
The SQL query below is executed on this database.
SELECT *
FROM Student
WHERE gender = 'F' AND
marks > 65;
The number of rows returned by the query is ______
Suppose the block size of the file system is 1024 bytes, and a pointer to a block occupies 5 bytes. The system uses binary search on the index file to search for a record with a given key. You may assume that a binary search on an index file of \( b \) blocks takes \( \lceil \log_2 b \rceil \) block accesses in the worst case.
Given a key, the number of block accesses required to identify the block in the data file that may contain a record with the key, in the worst case, is __________.

\[ L = \{w \in \{0, 1\}^* \mid w \text{ does not contain three or more consecutive 1's}\} \]
The minimum number of states in a Deterministic Finite-State Automaton (DFA) for \( L \) is __________.
The number of bits in the TAG is __________.
| Subnet Number | Subnet Mask | Interface ID |
|---|---|---|
| 200.150.0.0 | 255.255.0.0 | 1 |
| 200.150.64.0 | 255.255.224.0 | 2 |
| 200.150.68.0 | 255.255.255.0 | 3 |
| 200.150.68.64 | 255.255.255.224 | 4 |
| Default | 0 |
A packet addressed to a destination address 200.150.68.118 arrives at the router. It will be forwarded to the interface with ID ________.
Showing 5 of 65 questions