Recent questions tagged iitb-ms-phd-test-may-2022

0 0 votes
0 0 answers
103
103 views
What's the output produced by the following program?#include <iostream using namespace std; class A; class B; class C; class A { public: A(){} virtual void f (B *bp); vir...
0 0 votes
0 0 answers
63
63 views
The picture shows a model in the class diagram notation of UML, with inheritance, aggregation and association relations. Identify which ones from among the given object (...
0 0 votes
0 0 answers
91
91 views
$\text{UML}$ state charts use hierarchy as well as $\text{AND}$ (orthogonal regions) and $\text{OR}$ decomposition of state machines providing a compact representation of...
0 0 votes
0 0 answers
65
65 views
Consider the following function Partition where input array $a$ of size n only contains integers $1,2,3$ (they occur any number of times and in any order).Function Partit...
0 0 votes
0 0 answers
75
75 views
How many semantically unique functions can be written given the function signature bool f(bool, bool, bool)? The function is a pure function, which does not use any histo...
0 0 votes
0 0 answers
81
81 views
State the truth values of the following logical expressions:$\forall x, p(x) \rightarrow \neg \exists x, \neg p(x)$$(\forall x, p(x)) \wedge(\forall x, q(x)) \rightarrow ...
0 0 votes
0 0 answers
55
55 views
Let $S=\{1, . ., n\}$ the set of first $n$ natural numbers. How many distinct pairs $(A, B)$ can be there satisfying the condition $A \subseteq B \subseteq S$?
0 0 votes
0 0 answers
75
75 views
Define the relation ${div} \subseteq \mathcal{N} \times \mathcal{N}$ where ${div}(i, j)$ iff $i$ divides $j$. Here $\mathcal{N}=\{1,2, \ldots\}$, the set of natural numbe...
0 0 votes
0 0 answers
52
52 views
Consider the following lex script%% a { printf(''Found Token 1''); } a(b|cd)*b { printf(''Found Token 2''); } a(b|cd)*cd { printf(''Found Token 3''); }Draw the minimum DF...
0 0 votes
0 0 answers
76
76 views
Consider the following grammar with the associated SLR parsing table.\[\begin{array}{ll}0 & \mathrm{~A}^{\prime} \rightarrow \mathrm{A} \\1 & \mathrm{~A} \rightarrow \mat...
0 0 votes
0 0 answers
76
76 views
Consider the following DFA representing the transitions between sets of LR$(0)$ items of a grammar containing a single non-terminal A and terminals a, b, and c. Recall th...
0 0 votes
0 0 answers
82
82 views
The following syntax-directed definition (SDD) generates a three address code (TAC) for an assignment statement involving binary and ternary arithmetic expression. It use...
0 0 votes
0 0 answers
80
80 views
Consider the following C program.#include <stdio.h int z; int recur(int x) { int y = 1; if (x <= 30) { x = x + z; y = recur (x - y); z = x * 5; } return z; } int main() {...
0 0 votes
0 0 answers
89
89 views
Consider the following example of nested procedure declarations (although they are not supported by standard C, they are supported by GCC as an extension of C). You have ...
0 0 votes
0 0 answers
60
60 views
The following function prints H rows of width W characters each. Consider that rows and columns are numbered starting from $0$. All even numbered rows should consist of o...
0 0 votes
0 0 answers
82
82 views
The $\text{C}$ code below is meant to implement a simple algorithm to compute the Greatest Common Divisor (GCD) of two numbers (assumed greater than $0$). You are asked t...
0 0 votes
0 0 answers
52
52 views
Recall that a filesystem in an operating system (OS) stores two types of entities: files and directories. A file is a sequence of bytes containing application data, e.g.,...
0 0 votes
0 0 answers
92
92 views
Consider the following piece of code.int i=0; while(1) { if(i%2) { cout << "Welcome to MS/Ph.D. admissions, CSE-IITB" << endl; i++; } }What is the accuracy of the last-ti...
0 0 votes
0 0 answers
51
51 views
Which of the following statements is/are $\text{FALSE}?$ You are not supposed to assume anything beyond what is asked in the question.Number of stages in an instruction p...
0 0 votes
0 0 answers
80
80 views
Which of the following statements is/are $\text{TRUE}?$In general, increasing the associativity of the cache tends to decrease the conflict miss rate.In a set-associative...
0 0 votes
0 0 answers
72
72 views
Which of the following statements is/are $\text{TRUE}$?Data Forwarding eliminates all data hazards in the vanilla $5$ -stage pipelineFor a cache, misses per kilo instruct...
0 0 votes
0 0 answers
83
83 views
Consider the page table below, where numbers are in decimal and everything is numbered starting from zero, all addresses are memory byte addresses, and the page size is $...
0 0 votes
0 0 answers
42
42 views
An organization has been assigned the network prefix $120.21.0.0/16$ and it needs to create a set of subnets that support up to $25$ hosts on each subnet. What is the max...
0 0 votes
0 0 answers
74
74 views
Consider two nodes, A and B connected by an asymmetric link. The A to B link has a bandwidth of $40$kbps (kilobits per second) and a propagation delay of $170$ msec (mill...
0 0 votes
0 0 answers
81
81 views
Given a relation $\mathrm{R}(\mathrm{A}, \mathrm{B}, \mathrm{C})$, write a SQL query to determine if the functional dependency $\mathrm{B} \rightarrow \mathrm{C}$ holds o...
0 0 votes
0 0 answers
73
73 views
Which of the following statements is/are $\text{FALSE}?$ You are not supposed to assume anything beyond what is asked in the question.Microarchitectural timing channels e...
0 0 votes
0 0 answers
79
79 views
Which of the following statements is/are $\text{FALSE}?$ You are not supposed to assume anything beyond what is asked in the question.Interrupts are asynchronous in natur...
0 0 votes
0 0 answers
73
73 views
Which of the following statements is/are $\text{TRUE}?$ You are not supposed to assume anything beyond what is asked in the question.$\text{L1}$ caches are designed for c...
0 0 votes
0 0 answers
68
68 views
Which of the following statements is/are $\text{FALSE}?$ You are not supposed to assume anything beyond what is asked in the question.System calls are slower in execution...
0 0 votes
0 0 answers
67
67 views
Which of the following statements is/are $\text{TRUE}?$ You are not supposed to assume anything beyond what is asked in the question.Applications like a calculator should...