Q1) what is the value of i after execution of the following program.
Void main()
{
long l=1024;
int i=1;
while(l>=1)
{ l=l/2;
i=i+1;
}
}
a)8 b)11 c)10 d)100
Ans:b
q2) this Question is based on the complexity .
Q3)
s->ab
a->a
b->bba
which one is false for above grammar.
Q3) Find preorder traversal.
Q4) Find output of the program.
Q5) if the mean falilure hour is 10,000 and 20 is the mean repair hour. If the printer is used by 100 customer, then find the availability.
1)80% 2)90% 3)98% 4)99.8% 5)100%
Q6) Question on probability.
Q7) In a singly linked list if there is a pointer s on the first element and pointer l is on the last element. Then which operation will take more time
based on the length of the list.
1) adding element at the first.
2) adding element at the end of the list.
3) to exchange the first 2 element.
4) deleting the element from the end of the list.
Ans: 2