Recent activity

321
views
2 answers
1 votes
#include<stdio.h>#define ADD(a,b)(a+b)#define SQUARE(x)(x*x)int main(){int x=2;int y=3;int z = ADD(SQUARE(x++),y);printf("%d\n",z);return 0;}What is the output of the above code snippet?
9.3k
views
5 answers
15 votes
Let $H$ be a binary min-heap consisting of $n$ elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum element in ... \Theta (1)$\Theta (\log n)$\Theta (n)$\Theta (n \log n)$
248
views
0 answers
0 votes
The equation of the plane through the point $(-1,3,2)$ and perpendicular to each of the planes $x+2y+3z=5$ and $3x+3y+z=0$ is$7x-8y+3z+25=0$7x+8y+3z+25=0$7x-8y+3z-25=0$7x-8y-3z-25=0$
618
views
2 answers
4 votes
The sum of three positive numbers is $12$ and two of them are equal. Find the largest possible product.$86$64$48$72$
16.5k
views
5 answers
42 votes
We are given a set $X = \{X_1,\ldots,X_n\}$ where $X_i=2^i$. A sample $S\subseteq X$ is drawn by selecting each $X_i$ ... $ is:$\left(\frac{1}{n}\right)$2$\sqrt n$n$
6.2k
views
5 answers
4 votes
Consider the following binary search tree T given below: Which node contains the fourth smallest element in T?QVWX
164
views
1 answers
0 votes
let suppose address of first index of array is n and size of each block of array is u. then the index of second element is a+u.let suppose the array has m elements. ... array of same size, if it's address of second last element is (n - u).
32.4k
views
8 answers
57 votes
The average number of key comparisons required for a successful search for sequential search on $n$ items is$\frac{n}{2}$\frac{n-1}{2}$\frac{n+1}{2}$None of the above
7.0k
views
5 answers
26 votes
Give an optimal algorithm in pseudo-code for sorting a sequence of $n$ numbers which has only $k$ distinct numbers ($k$ is not known a Priori). Give a brief analysis for the time-complexity of your algorithm.
22.4k
views
10 answers
56 votes
Let $A$ be an array of $31$ numbers consisting of a sequence of $0$'s followed by a sequence of $1$'s. The problem is to find the smallest index ... in $A$. The worst case number of probes performed by an optimal algorithm is ____________.
21.2k
views
4 answers
57 votes
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive $0$'s and two consecutive $1$ ... * + (0+1)^*11 (0+1)^*$00(0+1)^*11 +11(0+1)^*00$
6.3k
views
2 answers
26 votes
Find the contents of the flip-flop $Q_2, Q_1$ and $Q_0$ in the circuit of figure, after giving four clock pulses to the clock terminal. Assume $Q_2Q_1Q_0=000$ initially.
377
views
1 answers
1 votes
The complement of the expression $\text{Y} = \text{ABC} + \text{AB} \overline{\rm C} + \overline{\rm A}\; \overline {\rm B} \text{C} + \overline{\rm A} \text{BC}$ is ... {C})$(\text{A} + \overline {\rm B}) ( \text{A} + \overline{\rm C})$
22.2k
views
5 answers
48 votes
Consider the following C program that attempts to locate an element $x$ in an array $Y[ \ ]$ using binary search. The program is erroneous. f (int Y[10] , int x) { int i, j, k; ... $ 2 < x < 20$ and $x$ is even
18.8k
views
4 answers
38 votes
Consider a grammar with the following productions$S \rightarrow a \alpha b \mid b \alpha c \mid aB$ ... $LR(k)$
10.3k
views
3 answers
36 votes
Which of the following features cannot be captured by context-free grammars?Syntax of if-then-else statementsSyntax of recursive proceduresWhether a variable has been declared before its useVariable names of arbitrary length
4.6k
views
3 answers
19 votes
Consider the following grammar for arithmetic expressions using binary operators $-$ and $/$ which are not associative$E \rightarrow E -T\mid T$T \rightarrow T/F\ ... ? If not, give an unambiguous grammar that gives $/$ precedence over $-$.
8.3k
views
6 answers
9 votes
The number of swappings needed to sort the numbers $8 , 22, 7, 9, 31, 5, 13$ in ascending order using bubble sort is$11$12$13$10$
5.7k
views
2 answers
3 votes
Of the following sorting algorithms, which has a running time that is least dependent on the initial ordering of the input?Mege SortInsertion SortSelection SortQuick Sort
2.5k
views
1 answers
2 votes
Given two sorted list of size $m$ and $n$ respectively. The number of comparisons needed the worst case by the merge sort algorithm will be:$m \times n$maximum of $m$ and $n$minimum of $m$ and $n$m+n-1$
18
views
0 answers
0 votes
Why does linear combination of 2 linearly independent vectors produce every vector in R^2 ?
1.7k
views
1 answers
2 votes
The following vectors $(1, 9, 9, 8), (2, 0, 0, 8), (2, 0, 0, 3)$ areLinearly dependentLinearly independentConstantNone of these
12.2k
views
11 answers
56 votes
Let $G_1=(V,E_1)$ and $G_2 =(V,E_2)$ be connected graphs on the same vertex set $V$ ... have a cut-edge (bridge)has chromatic number strictly greater than those of $G_1$ and $G_2$
3.2k
views
1 answers
1 votes
Which of the following tasks is/are the responsibility/responsibilities of the memory management unit $\text{(MMU)}$ in a system with paging-based memory management ... to write to a page marked with read-only permission in the page table
8
views
0 answers
0 votes
I have always been intrested in IIT couldnt crack them even though i did everything i could i know that might be hard to comorehend but i got some colleges ... with merit seats available and after that i intend to to take Gate for IIt
92
views
0 answers
1 votes
So, I got an offer of Mtech in CSIS, which was my second preference, wanted advice on whether to not lock and wait cse further rounds or should I lock the option ffor CSIS.and how is the CSIS course
290
views
3 answers
2 votes
Consider the following matrix A:$\left[\begin{array}{lll}2 & -1 & 0 \\ 0 & 2 & 0 \\ 1 & 0 & 2\end{array}\right]$ ... to eigenvalue $\lambda$ of $A$ then $x$ is also the eigenvector of $A^{-1}$.
97
views
1 answers
1 votes
#include <stdio.h> int main() { int (*a)[2]; int arr[4][4]={1,2,3,4,6,7,8,9}; a=arr; ++a; printf("%d",**a); return 0; }what is the answer NUMARICAL--------------------------------?
91
views
2 answers
1 votes
#include <stdio.h> int main() { // Write C code here int i=10,*p,**q,***r; p=&i; *p=15; q=&p; **q=20; r=&q; ***r=*p+1; printf("%d",i); return 0; }answer the output as integer _________
To see more, click for the full list of questions or popular tags.