1
What will be the output of the following C program? If you think it will give a runtime error, you need to mention it. In either case, your answer must include proper justifications without which no credit will be given.
2
3
If preorder of a BST is passed as an argument to the above function. Function returns 1 if, a)All the leaf nodes of the tree are at same level b) All the nodes of the tree have atmost 1 child c) True is a complete binary tree, where the nodes at each level are completely filled d) None of these
4
Can some plz design a dfa over binary string whr 1. each string is divisible by 7 ? 2. divivsile by 7 but start with 1
5
Consider a Grammar G as follows : $S\rightarrow W$ $W \rightarrow ZXY / XY$ $Y\rightarrow c/\epsilon$ $Z\rightarrow a/d$ $X\rightarrow Xb/\epsilon$ Draw the LL(1) parsing table for the given grammar ? NOTE :- The above grammar is NOT LL(1) .
6
The lower bound on the no. of comparisons required to sort n numbers is __________ ?
7
Consider the following game with two players, Aditi and Bharat. There are $n$ tokens in a bag. The two players know $n$, and take turns removing tokens from the bag. In each turn, a player can either remove one token or two tokens. The player that removes the last token from the ... has a winning strategy. Edit : Option (D) is : For both $n=7$ and $n=8$, Bharat has a winning strategy. (Source)
8
On planet TIFR, the acceleration of an object due to gravity is half that on planet earth. An object on planet earth dropped from a height $h$ takes time $t$ to reach the ground. On planet TIFR, how much time would an object dropped from height $h$ take to reach the ground? $\left(\dfrac{t}{\sqrt{2}}\right)$ $\sqrt {2}t$ $2t$ $\left(\dfrac{h}{t}\right)$ $\left(\dfrac{h}{2t}\right)$
9
10
A large community practices birth control in the following peculiar fashion. Each set of parents continues having children until a son is born; then they stop. What is the ratio of boys to girls in the community if, in the absence of birth control, 51% of the babies are born male? $51:49$ $1:1$ $49:51$ $51:98$ $98:51$
11
The number of ways , in which numbers 1,2,3,4,5 can be inserted into binary heap,such that resultant binary heap is max heap ? given ans :8
12
Number of states in DFA which accepts the binary strings divisible by 4 or 5. answer?
13
14
15
16
A full moon occurs every 29 nights. If you choose a night at random and then observe the night sky for 11 successive nights, what is the probability you will see a full moon? 0.03 0.11 0.38
17
I have a little doubt regarding the Language L.Any one please what L contain?
18
Let $C\subset \mathbb{Z} \times\mathbb{Z}$ be the set of integer pairs $(a, b)$ for which the three complex roots $r_{1}, r_{2}$ and $r_{3}$ of the polynomial $p(x)=x^{3}-2x^{2}+ax-b$ satisfy $r^{3}_{1}+r^{3}_{2}+r^{3}_{3}=0$. Then the cardinality of $C$ is $|C| = \infty$ $|C| = 0$ $|C| = 1$ $1 < |C| < \infty$
1 vote
19
why is B wrong? as far as i know DRAM has less number of gates and hence its cheaper. but static RAM contains many gates per bit
20
what is ur take on this? @arjun sir please see this
21
Which one among the following definitions of string str could cause problem when passed as the first argument to printf function? char str[] = "Hello World"; char str = "Hello World"; char *str = "Hello World"; char str[] = {'H','e','l','l','o',' ','W','o','r','l','d'};
Let $\frac{d}{dx} [f(x)] = \frac{e^{sinx}}{x} , x > 0 .$ If $\int_{1}^{4}(\frac{2e^{sinx^{2}}}{x}) dx = f(k) - f(1)$ where limits of integration is from $1$ to $4$ , then $k =?$
With $Σ =$ {$a,b$} , give a dfa for $L =$ {$w_1aw_2: |w1|≥ 3, |w2|≤ 5$}.
Is L = {a bn an ;n > 0} $\cup${aa bk a2k ;k > 0} a DCFL ???