GATE 2023 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2023

65 questions

MCQ 34 · MSQ 15 · NAT 161-mark 30 · 2-mark 35

Questions 61–65 of 65

Q61SQL2 marksNAT
Consider the following table named Student in a relational database. The primary key of this table is rollNum.
rollNumnamegendermarks1NamanM622AliyaF703AliyaF804JamesM825SwatiF65\begin{array}{|c|c|c|c|} \hline \\ rollNum&name&gender&marks \\ \hline 1&Naman&M&62\\ \hline 2&Aliya&F&70 \\ \hline 3&Aliya &F&80 \\ \hline 4&James&M&82\\ \hline 5&Swati&F&65\\ \hline \end{array}
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 ______

Q62File System2 marksNAT
Consider a database of fixed-length records, stored as an ordered file. The database has 25,000 records, with each record being 100 bytes, of which the primary key occupies 15 bytes. The data file is block-aligned in that each data record is fully contained within a block. The database is indexed by a primary index file, which is also stored as a block-aligned ordered file. The figure below depicts this indexing scheme.
Data File Primary Key (15 Bytes) Other Fields (85 Bytes) Index File Block Anchor Primary Key Block Pointer
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 bb blocks takes ⌈log⁡2b⌉\left \lceil \log_2 b \right \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 _____

Q63Finite Automata2 marksNAT
Consider the language L over the alphabet {0, 1}, given below:

L={w∈{0,1}∗∣w does not contain three or more consecutive 1’s}.L = \{w \in \{0, 1\}^* | 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 _____.

Q64Cache Memory2 marksNAT
An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with 32-bit address. The address is sub-divided into TAG, INDEX, and BLOCK OFFSET.
The number of bits in the TAG is ____.

Q65Network Layer Protocol2 marksNAT
The forwarding table of a router is shown below.
Subnet  NumberSubnet  MaskInterfaceID200.150.0.0255.255.0.01200.150.64.0255.255.224.02200.150.68.0255.255.255.03200.150.68.64255.255.255.2244Default0\begin{array}{|c|c|c|c|} \hline \\ Subnet \; Number&Subnet \;Mask&Interface ID \\ \hline 200.150.0.0 &255.255.0.0& 1\\ \hline 200.150.64.0 &255.255.224.0 &2\\ \hline 200.150.68.0 &255.255.255.0 &3\\ \hline 200.150.68.64 &255.255.255.224 &4 \\ \hline Default & &0\\ \hline \end{array}
A packet addressed to a destination address 200.150.68.118 arrives at the router. It will be forwarded to the interface with ID _____.