Consider two strings A = "qpqrr" and B = "pqprqrp". Let x be the length of the longest common subsequence (not necessarily contiguous) between A and B and let y be the number of such longest common subsequences between A and B. Then x +y = ___.
7
9
11
13
Answer: Option A
Consider the following code:
int f(int k)
{
static int i = 100;
int l;
if (i == k)
{
printf("something");
l= f(i);
return 0;
}
else return 0;
}
Which one of the following is TRUE?
the function returns 0 when j = 1000.
the function prints the string something for all values of j.
the function returns 0 for all values of j.
the function will exhaust the runtime stack or run into an infinite loop when j = 100
Answer: Option D
Which of the following is not linked list in DSA ?
Insertion
Deletion
Searching
Comparing
Answer: Option D
What is the significance of swap space in the disk?
Saving all URLs
Storing the super-block
Saving process data
Storing device drivers
Answer: Option C
Evaluate following expression:
a=3, b=6,c=4,d=2
a=b>c && b-c= a+c
0
1
Error
None of these
Answer: Option B
Substituting values we get (((3+6)>4)&&((6-4)<2))|| ((6+2)>=(3+4)) i.e. ((1)&&(0))||(1)= 1