Recent questions tagged goclasses2024-mockgate-14

362
views
0 answers
4 votes
DeMorgan's Laws ensure thatClosure under intersection and complementation imply closure under union.Closure under intersection and union imply closure under ... union, intersection, and complementation implies closure under all three.
556
views
1 answers
3 votes
Which of the following sets has the greatest cardinality?The set of real numbers RThe set of all functions from R to {0,1}The set of all finite subsets of natural numbersThe set of all finite-length binary strings
513
views
2 answers
7 votes
On a $64$-bit system, which of the following C expressions is equivalent to the C expression $(x[2]+4)[3]?$ Assume $\mathrm{x}$ is declared as $\textsf{int}\ast \ast \textsf{x}$\ast(( ... $(* \ast(x+2)+7)$
511
views
1 answers
4 votes
Suppose you implement a queue using a singly linked list with head and tail pointers so that the front of the queue is at the tail of the list, and the rear of the queue ... $O(1)$ for dequeue.$O(n)$ for both functions.
713
views
3 answers
3 votes
Which of the following strings are a member of the language described by the regular expression $\left(a^* {b} {a}^* b a^* b {a}^*\right)^*$b b b b$bbaaabb$bbaaabbbabb$b b a b b b a b$
722
views
2 answers
9 votes
Assume a linear page table, with a 1-byte page-table entry. Assume physical and virtual address spaces of size 128 bytes with 32-byte pages. The ... addresses that will get referred in fetch and execute of the above instruction?104210270
625
views
1 answers
2 votes
Suppose that an operating system provides two functions, block() which puts the calling process on the blocked queue, and wakeup(P) which moves process P ... B will always run forever with strick alternation printing BABABA .None of these
531
views
1 answers
4 votes
Consider a sliding window protocol with a window size of $5$ using cumulative ACKs (and ACK is being sent for each segment).Assume that the retransmission ... packet 3 was duplicated by the networkACK packet A3 was duplicated by the network
638
views
1 answers
5 votes
For sets $A$ and $B$, let $f: A \rightarrow B$ and $g: B \rightarrow A$ be functions such that $f(g(x))=x$ for each $x \in B$. Which among the ... function $f$ must be onto.The function g must be one-to-one.The function $g$ must be onto.
409
views
0 answers
4 votes
Consider the following schema (primary keys are underlined):Which of the following queries returns the department numbers of those departments for which there are no courses being offered?
1.0k
views
1 answers
10 votes
Consider the following lock requests in the Table below. And note that:$\mathrm{S}(\cdot)$ and $\mathrm{X}(\cdot)$ stand for 'shared lock' and 'exclusive lock', ... -').Select all that are correct.At t3: aAt t6: bAt t7: aAt t8: -
502
views
1 answers
5 votes
The provided C code is a version of the C string library function strlen(), which calculates the length of a given string.unsigned int mystrlen(char *c) { unsigned int i = 0; ... i++; return i;while (*(c + i) != '\0') ++i; return i;
525
views
1 answers
4 votes
What will be the output of the following C program?#include <stdio.h>void Mickey(int**, int, int);void Mouse(int, int*);int main(){ int a = 2, b = 3, c = 4; int * ... p); return;}void Mouse(int z, int *p){ *p = *p+1; return;}
632
views
2 answers
5 votes
Let $B$ be a binary search tree (BST) with eight nodes filled with the following set of eight integer keys $A=\{10,2,5,3,20,15,9,22\}$. The order in which ... all eight keys of $A$ are present in $B$.How many leaf nodes are present in B?
671
views
1 answers
7 votes
Consider a stack whose elements are unsigned integers and support the following operations:PUSH a: Pushes the element 'a' onto the stack.ADD: Adds the two ... as it is used. Your final count should include initial 3 PUSH instructions.
514
views
1 answers
5 votes
We have a procedure $P(n)$ that makes multiple calls to a procedure $Q(m)$, and runs in polynomial time in $n$. Unfortunately, a significant flaw was discovered in $Q(m)$ ... time in $n$ if, for each call $Q(m),m \underline<\log \;n.$
443
views
1 answers
2 votes
Consider the quadratic equation $x^2+\dfrac{x}{2}+c=0$, where $c$ is chosen uniformly randomly from the interval $[0,1]$. What is the probability that the given quadratic equation has a real ... b^2-4 a c}}{2a}$.$1 / 2$1 / 4$1 / 8$1 / 16$
664
views
2 answers
7 votes
Consider a $2 \times 2$ matrix M. Which of the following are NOT POSSIBLE for the system of equations $M x=p?$no solutions for some but not all $\vec{p}$; ... one solution for some $\vec{p}$ and more than one solution for some $\vec{p}$
460
views
1 answers
6 votes
Consider the following database relation: $\mathrm{R}=(\mathrm{SFLNGCRW} \mathrm{H})=(\mathrm{S}$ : SID, F: First Name, L: Last ... RatingRating determines WageRating determines CourseRating and First Name determine Wage and Hours of Work
493
views
1 answers
4 votes
Consider the following forwarding table in a router that uses longest prefix matching to forward packets. Assume that 4-bit addressing is used. ... $Y=00$X=010$ and $Y=00$X=00$ and $Y=0$
382
views
1 answers
4 votes
Consider the following given grammar and the parse tree for the sentence $x + y * z.$The first reduction made by the shift-reduce parser is labeled as 1, and we keep ... $T \rightarrow T^* P$ will be labeled 7.
1.1k
views
0 answers
4 votes
The grammar shown below is LL(k) for some value of k. What is the smallest value of k for which this grammar is LL(k)?
303
views
1 answers
4 votes
Consider the following pseudocode procedure.Which of the following best describes procedure mystery?It returns a list of numbers from 1 to $n$.It prints every third number from 1 ... $n$.
539
views
1 answers
4 votes
Consider the cache of size 512 bytes that is direct-mapped?Suppose the size of integer is 4 bytes and block size is 16 bytes. Assume cache is initially empty ... }What is the miss rate for the above loop? (roundoff to two decimal places)
677
views
2 answers
6 votes
The coefficient of $x^6$ in the expansion of $A(x)$ is, where$A(x)=\frac{x(1+x)}{(1-x)^3}$
678
views
1 answers
7 votes
A strongly connected component $(\mathrm{SCC})$ of a directed graph $\mathrm{G}=(\mathrm{V}, \mathrm{E})$ is a maximal set of vertices such that any two vertices in ... acyclic graph $G^{\prime}$ be $A, B$ respectively, then what is $A+B?$
1.1k
views
3 answers
12 votes
Let $\mathrm{F}$ and $\mathrm{G}$ be two propositional formulae.Which of the following is/are True?If $F \vee G$ ... $F$ is a tautology and $G$ is a contradiction.
670
views
1 answers
2 votes
Consider the shift register circuit shown in below figure. Assume that $\mathbf{I}_3 \mathbf{I}_2 \mathbf{I}_1 \mathbf{I}_0=0101$ has been loaded in the 4- ... clock signal we need to keep shift=1 such that zero detect is activated to a 1?
405
views
0 answers
3 votes
The logic circuit above is used to compare two unsigned 2-bit numbers, $X_1 X_0=X$ and $Y_1 Y_0=Y$, where $X_0$ and $Y_0$ are the least significant bits. (A small circle on any ... $ have the value 1?$X\gt Y$X\lt Y$X=Y$X \neq Y$