ExamVeda
Login
Home
21
The main time taking step in fractional knapsack problem is . . . . . . . .
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
22
Solve the following recurrence using Master's theorem.
T(n) = T (n/2) + 2n
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
23
What is the output of the following code?
#include<stdio.h>
int recursive_get_len(char *s, int len)
{
      if(s[len] == 0)
        return 0;
      return 1 + recursive_get_len(s, len+1);
}
int main()
{
      char *s = "123-1-2-3";
      int len = recursive_get_len(s,0);
      printf("%d",len);
      return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
24
A connected graph has a maximum of (n - 2) cut vertices.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
25
Which of the following will generate random numbers in the range 1-100 (both inclusive)?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
26
What will be the ciphered text corresponding to "EXAMPLE" if trithemius cipher is used for encryption?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
27
Euclidean algorithm does not require the calculation of prime factors.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
28
A graph with chromatic number less than or equal to k is called?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
29
What is the output of the following code?
#include<stdio.h>
#include<string.h>
void reverse_string(char *s)
{
     int len = strlen(s);
     int i,j;
     i=0;
     j=len-1;
     while(i < j)
     {
         char tmp = s[i];
         s[i] = s[j];
         s[j] = tmp;
         i++;
         j--;
     }
}
int main()
{
      char s[100] = "reverse";
      reverse_string(s);
      printf("%s",s);
      return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
30
Which page replacement strategy uses referenced bits and modified bits to replace the page?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board