Computer Science & Information Technology (CS) 2024 [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.
Two wizards try to create a spell using all the four elements, water, air, fire, and earth. For this, they decide to mix all these elements in all possible orders. They also decide to work independently. After trying all possible combination of elements, they conclude that the spell does not work. How many attempts does each wizard make before coming to this conclusion, independently?
P: This fortuitous geological event generated a colossal amount of energy and heat that resulted in the rocks rising to an average height of 4 km across the contact zone.
Q: Thus, the geophysicists tend to think of the Himalayas as an active geological event rather than a static geological feature.
R: The natural process of the cooling of this massive edifice absorbed large quantities of atmospheric carbon dioxide, altering the earth’s atmosphere and making it better suited for life.
S: Many millennia ago, a breakaway chunk of bedrock from the Antarctic Plate collided with the massive Eurasian Plate.
A person sold two different items at the same price. He made 10% profit in one item, and 10% loss in the other item. In selling these two items, the person made a total of
The renewable sources of electricity generation consist of Hydro, Solar and Wind. Assuming that the total electricity generated remains the same from 2007 to 2023, what is the percentage increase in the share of the renewable sources of electricity generation over this period?

The minimum number of such cuts required is
| 1 | X | 4 | 3 |
| X | 5 | 5 | 4 |
| 3 | X | 6 | X |
The number in a cell represents the count of the immediate neighboring cells (left, right, top, bottom, diagonals) NOT having a cross (X). Given that the last row has no crosses (X), the sum of the four numbers to be filled in the last row is

\( p \): Fail grade can be given.
\( q \): Student scores more than 50% marks.
Consider the statement: “Fail grade cannot be given when student scores more than 50% marks.”
Which one of the following is the CORRECT representation of the above statement in propositional logic?
#include <stdio.h> int g(int p) { printf("%d", p); return p; } int h(int q) { printf("%d", q); return q; } void f(int x, int y) { g(x); h(y); } int main() { f(g(10), h(20)); }
Which one of the following options is the CORRECT output of the above C program?
The format of a single-precision floating-point number as per the IEEE 754 standard is:
| Sign (1 bit) | Exponent (8 bits) | Mantissa (23 bits) |
|---|
\[ T(0) = 1, \] \[ T(1) = 2, \text{ and } \] \[ T(n) = 5T(n-1) - 6T(n-2) \quad \text{for } n \geq 2 \]
Which one of the following statements is TRUE?
When six unbiased dice are rolled simultaneously, the probability of getting all distinct numbers (i.e., 1, 2, 3, 4, 5, and 6) is
Once the DBMS informs the user that a transaction has been successfully completed, its effect should persist even if the system crashes before all its changes are reflected on disk. This property is called
In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one of the following statements is TRUE?
Consider the following two sets:
| Set X | Set Y |
|---|---|
| P. Lexical Analyzer | 1. Abstract Syntax Tree |
| Q. Syntax Analyzer | 2. Token |
| R. Intermediate Code Generator | 3. Parse Tree |
| S. Code Optimizer | 4. Constant Folding |
Which one of the following regular expressions is equivalent to the language accepted by the DFA given below?

Which of the following statements is/are TRUE about the destination IP and MAC addresses on this packet at the time it leaves X?
Which of the following tasks is/are the responsibility/responsibilities of the memory management unit (MMU) in a system with paging-based memory management?
Consider a process P running on a CPU. Which one or more of the following events will always trigger a context switch by the OS that results in process P moving to a non-running state (e.g., ready, blocked)?
Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?
Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?
Which of the following statements about IPv4 fragmentation is/are TRUE?
Which of the following statements is/are FALSE?
Instruction Number: Opcode destination reg, source reg-1, source reg-2
Consider the following sequence of instructions to be executed in a pipelined processor:
I1: DIV R3, R1, R2
I2: SUB R5, R3, R4
I3: ADD R3, R5, R6
I4: MUL R7, R3, R8
Which of the following statements is/are TRUE?
Which of the following fields of an IP header is/are always modified by any router before it forwards the IP packet?
int fX(char *a) {
char *b = a;
while(*b)
b++;
return b - a;
}
Which of the following statements is/are TRUE?
\( P = \{(x,x) \mid x \in \{1,2,3,4\}\} \cup \{(1,2), (3,2), (3,4)\} \)
The number of total orders on {1,2,3,4} that contain P is ________
#include <stdio.h>
int main() {
double a[2]={20.0, 25.0}, *p, *q;
p = a;
q = p + 1;
printf("%d,%d", (int)(q - p), (int)(*q - *p));
return 0;
}
Consider a single processor system with four processes A, B, C, and D, represented as given below, where for each process the first value is its arrival time, and the second value is its CPU burst time.
A (0, 10), B (2, 6), C (4, 3), and D (6, 7).
Which one of the following options gives the average waiting times when preemptive Shortest Remaining Time First (SRTF) and Non-Preemptive Shortest Job First (NP-SJF) CPU scheduling algorithms are applied to the processes?
Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?
Which one of the following statements is TRUE?
\[ S \rightarrow AaAb \mid BbBa \\ A \rightarrow cS \mid \epsilon \\ B \rightarrow dS \mid \epsilon \]
The following is a partially-filled LL(1) parsing table.
| \( a \) | \( b \) | \( c \) | \( d \) | \( \$ \) | |
|---|---|---|---|---|---|
| \( S \) | \( S \rightarrow AaAb \) | \( S \rightarrow BbBa \) | (1) | (2) | |
| \( A \) | \( A \rightarrow \epsilon \) | (3) | \( A \rightarrow cS \) | ||
| \( B \) | (4) | \( B \rightarrow \epsilon \) | \( B \rightarrow dS \) |
Which one of the following options represents the CORRECT combination for the numbered cells in the parsing table?
Note: In the options, “blank” denotes that the corresponding cell is empty.
Which one of the following regular expressions represents the language accepted by \( M \)?

The C code snippet given below has been written to compute the length of the longest subarray of X that contains at most two distinct integers. The code has two missing expressions labelled (P) and (Q).
int first=0, second=0, len1=0, len2=0, maxlen=0;
for (int i=0; i < n; i++) {
if (X[i] == first) {
len2++; len1++;
} else if (X[i] == second) {
len2++;
len1 = (P) ;
second = first;
} else {
len2 = (Q) ;
len1 = 1; second = first;
}
if (len2 > maxlen) {
maxlen = len2;
}
first = X[i];
}
Which one of the following options gives the CORRECT missing expressions?
(Hint: At the end of the i-th iteration, the value of len1 is the length of the longest subarray ending with X[i] that contains all equal values, and len2 is the length of the longest subarray ending with X[i] that contains at most two distinct values.)
| (0) | + | p | r |
| (1) | |||
| (2) | uminus | (1) | |
| (3) | |||
| (4) | / | u | w |
| (5) | + | (3) | (4) |
| (6) | |||
| (7) | = | (6) | (5) |
Which one of the following options fills in the missing entries CORRECTLY?
The relation schema, Person(pid, city), describes the city of residence for every person uniquely identified by pid. The following relational algebra operators are available: selection, projection, cross product, and rename.
To find the list of cities where at least 3 persons reside, using the above operators, the minimum number of cross product operations that must be used is
| // code of T1 | // code of T2 |
|---|---|
| wait(s1); x = x+1; print(x); wait(s2); signal(s1); | wait(s1); x = x+1; print(x); signal(s2); signal(s1); |
Which of the following outcomes is/are possible when threads T1 and T2 execute concurrently?
| 400 (Top) | |
|---|---|
| 300 | |
| 200 | |
| 100 | |
| Stack S1 | Stack S2 |
Only the following three operations are available:
PushToS2: Pop the top element from S1 and push it on S2.
PushToS1: Pop the top element from S2 and push it on S1.
GenerateOutput: Pop the top element from S1 and output it to the user.
Note that the pop operation is not allowed on an empty stack and the push operation is not allowed on a full stack.
Which of the following output sequences can be generated by using the above operations?

Which of the following is/are EQUAL to 224 in radix-5 (i.e., base-5) notation?
\(f1 = \sum(0,2,3,5,7,8,11,13)\)
\(f2 = \sum(1,3,5,7,11,13,15)\)
\(f3 = \sum(0,1,4,11)\)
\(f4 = \sum(0,2,6,13)\)
With respect to the circuit given above, which of the following options is/are CORRECT?

\(S \to aS, S \to aSbS, S \to c\)
Let \(w \in L(G)\). Let \(n_a(w), n_b(w), n_c(w)\) denote the number of times a, b, c occur in w, respectively. Which of the following statements is/are TRUE?
- \(X\) is not the empty set.
- \(Y\) is not the empty set.
- Intersection of \(X\) and \(Y\) is the empty set.


R-type Instruction Format:
| OPCODE | UNUSED | DST Register | SRC Register1 | SRC Register 2 |
|---|
I-type Instruction Format:
| OPCODE | DST Register | SRC Register | # Immediate value/address |
|---|
In the OPCODE, 1 bit is used to distinguish between I-type and R-type instructions and the remaining bits indicate the operation. The processor has 50 architectural registers, and all register fields in the instructions are of equal size.
Let \(X\) be the number of bits used to encode the UNUSED field, \(Y\) be the number of bits used to encode the OPCODE field, and \(Z\) be the number of bits used to encode the immediate value/address field. The value of \(X + 2Y + Z\) is __________
An active process in this system accesses 2000 unique pages during its execution, and none of the pages are swapped out to disk. After it completes the page accesses, let \(X\) denote the minimum and \(Y\) denote the maximum number of pages across the two levels of the page table of the process.
The value of \(X+Y\) is __________
\(S' \rightarrow S\)
\(S \rightarrow SS \mid Aa \mid bAc \mid Bc \mid bBa\)
\(A \rightarrow d\#\)
\(B \rightarrow @\)
Let \(I_0 = CLOSURE(\{S' \rightarrow \bullet S\})\). The number of items in the set \(GOTO(I_0, S)\) is __________
Showing 5 of 65 questions