Log In

Answers by vijaycs

6 votes
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.
answered Apr 2, 2017 in Programming 433 views
5 votes
4 votes
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
answered Jan 13, 2017 in DS 195 views
4 votes
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
answered Dec 29, 2016 in Theory of Computation 427 views
8 votes
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) .
answered Dec 27, 2016 in Compiler Design 4.9k views
15 votes
The lower bound on the no. of comparisons required to sort n numbers is __________ ?
answered Dec 23, 2016 in Algorithms 1.6k views
15 votes
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)
answered Dec 23, 2016 in Numerical Ability 884 views
7 votes
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)$
answered Dec 21, 2016 in Numerical Ability 488 views
6 votes
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$
answered Dec 9, 2016 in Numerical Ability 381 views
9 votes
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
answered Dec 9, 2016 in Programming 1.7k views
3 votes
Number of states in DFA which accepts the binary strings divisible by 4 or 5. answer?
answered Dec 9, 2016 in Theory of Computation 1.3k views
2 votes
answered Nov 30, 2016 in Programming 122 views
5 votes
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
answered Nov 29, 2016 in Probability 446 views
4 votes
I have a little doubt regarding the Language L.Any one please what L contain?
answered Nov 14, 2016 in Theory of Computation 307 views
0 votes
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$
answered Nov 12, 2016 in Set Theory & Algebra 131 views
1 vote
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
answered Oct 24, 2016 in CO and Architecture 145 views
0 votes
what is ur take on this? @arjun sir please see this
answered Oct 24, 2016 in CO and Architecture 227 views
16 votes
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[12] = "Hello World"; char *str = "Hello World"; char str[] = {'H','e','l','l','o',' ','W','o','r','l','d'};
answered Oct 24, 2016 in Programming 645 views
2 votes
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 =?$
answered Oct 4, 2016 in Calculus 348 views
4 votes
Is L = {a bn an ;n > 0} $\cup${aa bk a2k ;k > 0} a DCFL ???
answered Oct 4, 2016 in Theory of Computation 187 views
0 votes
Consider the following code:- #define N 2 #define FALSE 0 #define TRUE 1 Int Interested [N]; //initially both are set to FALSE. Void enter(int process) { int other; Other=1-process; Interested[process]=TRUE; While(Interested[other]==TRUE); { CRITICAL SECTION; } } Void Leave(int process) { Interested[process]=FALSE; } Find whether progress, mutual exclusion and bounded waiting are satisfied?
answered Sep 28, 2016 in Operating System 263 views