Recent questions tagged goclasses2024-mockgate-12

1.0k
views
1 answers
11 votes
Consider the two statements regarding the Huffman's algorithm -$\text{S1:}$ The character with the highest probability (all probabilities are unique) is ... $\mathrm{S} 2$ is correctBoth are correct statementsBoth are incorrect statements
693
views
1 answers
5 votes
Consider the following grammar- ... .$\operatorname{First}(\mathrm{A})$ and $\operatorname{First}(\mathrm{T})$ are same.
443
views
1 answers
3 votes
The Euclidean algorithm is used to find the greatest common divisor $(\mathrm{gcd})$ of two positive integers $\mathrm{a}$ and $\mathrm{b}$.input(a) input(b) while b>0 begin r:= a mod ... $ $2,53,1,0$53,2,1,0$53,4,1,0$53,5,1,0$
446
views
1 answers
2 votes
What are the sequence of popped-out values if the sequence of operations - $\textsf{push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), pop}$ are performed on a stack?$2, 2, 1, 1, 2$2, 2, 1, 1, 1$2, 1, 2, 2, 1$2, 1, 2, 2, 2$
617
views
2 answers
3 votes
Suppose we have a four-way set associative physically addressed cache of size $256 \mathrm{KB}$ and $\text{16B}$ blocks, on a machine that uses $32$-bit physical addresses. How many bits will be used for the index?
918
views
2 answers
8 votes
A college has $10$ (non-overlapping) time slots for its courses, and assigns courses to time slots randomly and independently. A student randomly chooses $3$ of ... there is a conflict in the student's schedule? (answer upto $2$ decimals)
796
views
2 answers
7 votes
Let $\text{A}$ be a $20 \times 11$ matrix with real entries. After performing some row operations on $\text{A}$, we get a matrix $\text{B}$ which has $12$ nonzero rows. ... $0.$The rank of $\text{B}$ is at most $11.$
761
views
1 answers
6 votes
Consider the following program execution involving 2 threads accessing the shared variable a which has been initialised to $0.$Which of the following statement(s ... both threads will finish, or none of them of will finish execution
767
views
1 answers
4 votes
Consider a system with $4 \mathrm{~GB}$ of physical memory and $64 \mathrm{~GB}$ of Virtual Memory. The page size is $4 \mathrm{~KB}$. Recall that the ... PTEs.How many pages does our page table occupy if we have a single-level page table?
851
views
1 answers
2 votes
Which of the following is/are true in context of error control?A CRC of length $\text{R}$ is calculated over a message of length $\text{M}$ bits ... of two.A larger Hamming distance is needed to detect errors than to correct errors.
590
views
0 answers
4 votes
Host $\text{A}$ and $\text{B}$ are behind different NATs. $\text{A's}$ private IP address is $192.168.1.11,$ and $\text{B's}$ private IP is $10.1.1.12.$ The public IP of ... the packet leaving $\text{A}?$4.3.2.1$2.2.2.2$10.1.1.12$1.2.3.4$
481
views
1 answers
2 votes
Consider the following two declarations for $\textsf{arr1}$ and $\textsf{arr2}:$int arr1[2][3]; int r1[3]; int r2[3]; int * arr2[2] = {r1, ... $(\operatorname{arr}2)=32$ bytes
694
views
3 answers
7 votes
What will be the output of following program ?#include <stdio.h> int thefunction(int a) { static int b = 0; b++; a = a + b; return a; } int main() { int b = 0; int i; ... 3; i++) { b = b + thefunction(i); } printf("%d\n", b); return 0; }
507
views
1 answers
6 votes
What will be the output of the following program?main() { int a[2][2] = { {1,2},{3,4} }; int(*p)[2][2]; p = &a; printf("%d", (*p)[0][0]); }$1$3$4$None of these
553
views
1 answers
3 votes
Consider the following NFA $M$ and say what language is recognised by constructing the machine that recognises the complement of $L(M)$ in $\{a\}^*$.$\emptyset$\{a\}^*$\{a\}$\{\varepsilon\}$
455
views
1 answers
4 votes
Consider the following context-free grammar, with start symbol $S$ and terminals $a, ; , \lt , \gt .$ ... many different parse trees are there for the string $\lt \lt a \gt ;a\gt ?$
1.0k
views
2 answers
6 votes
The number of ways that one can divide $10$ distinguishable objects into $3$ ... In how many different ways can one do this if the piles are also distinguishable?
1.1k
views
2 answers
5 votes
The number of ways that one can divide $10$ distinguishable objects in $3$ ... In how many different ways can one do this if the objects are also indistinguishable?
524
views
1 answers
2 votes
Let $\ast $ be the binary operation on the rational numbers given by $a \ast b=a+b+2 a b$. Which of the following are true?$\ast $ is commutativeThere is a rational ... a $\ast \;-$ inverse. I onlyI and II onlyI and III onlyI, II, and III
815
views
1 answers
6 votes
The clock rate for Machine $\mathrm{A}$ is $2.4 \mathrm{GHz}$, and the clock rate for machine $\text{B}$ is $3.0 \mathrm{GHz}$. For a particular program, the average ... , with respect to this program. What is $\mathrm{K}?$1$4 / 3$2$3 / 4$
519
views
1 answers
4 votes
481
views
1 answers
2 votes
What is the output for the following circuit?$w=\overline{b} c$w=b \oplus c$w=\overline{b \oplus c}$w=\overline{b}+\overline{c}$
601
views
3 answers
4 votes
An attribute $A$ is called prime if $A$ is in any of the candidate keys. Assume in the following statements, $\mathrm{A}$ is an attribute $\&\;\mathcal{X}$ is a set of attributes ... , D - BCNF}$\text{A - BCNF, B - 3NF, C - 2NF, D - 1NF}$
817
views
0 answers
3 votes
Assume that a data file has an index consisting of $\text{N}$ items, where $\text{N}$ is large. If a binary search of the index is used to find an item, then, of the ... $\text{N} \log _2 \text{N}$
849
views
1 answers
12 votes
Let $\mathrm{R}(\mathrm{a}, \mathrm{b})$ be a schema and $\mathrm{Q} 1$ and $\mathrm{Q} 2$ are queries on $\mathrm{R}$.Q1: SELECT * FROM R; Q2: ... $\text{Q1}$ and $\text{Q2}$ produce different answers.
529
views
1 answers
6 votes
What will be the output of the following C program?#include<stdio.h> void main() { int i=6; for(--i; --i; i--) { printf("%d",i); } }$42$31$Infinite loopNone of these
567
views
1 answers
1 votes
Consider the following C program:-#include <stdio.h> void ubswap(int **a, int **b) { int* temp = *a; *a = *b; *b = temp; } int main() { int x = 1, y = 9; int ... $x$ and $y$u$ and $v$a$ and $b$None of the above
598
views
1 answers
3 votes
You are given a bit-array $A[1 \ldots n]$ (i.e., $A[i] \in\{0,1\}$ for each $i$ ) and told that this is a "$0$ -to-$1$ bit-array. This means that ... $\Theta(n \log n)$\Theta(n)$\Theta\left(n^{2}\right)$
716
views
2 answers
5 votes
Consider an array that has $10$ distinct elements. Suppose we use randomized quicksort (with the pivot chosen uniformly at random). What is the probability that the ... of the chosen pivot. The pivot itself is not part of any subarray.
596
views
1 answers
5 votes
Consider the following pseudocode for a function that operates on an $\textsf{N}$ element array $\textsf{A[1],A[2]},\dots,\textsf{A[N]}$ of integers.function ... $\textsf{A[j] < A[position]}$ checked?