ExamVeda
Login
Home
71
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] = "rotator";
      char t[100];
      strcpy(t,s);
      reverse_string(s);
      if(strcmp(t,s) == 0)
        printf("Yes");
      else
        printf("No");
      return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
72
What is the chromatic number of compliment of line graph of bipartite graph?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
73
Which of the following is an NP complete problem?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
74
Which of the following is the correct mathematical application of Euclid's algorithm?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
75
What will be the time complexity of the brute force approach used to find the articulation points in a given graph?
For every vertex V, do: 
Remove V from the graph  
See if the graph remains connected 
If graph is disconnected, add V to the resultant set  
Add V back to the graph
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
76
What is the running time of the Huffman algorithm, if its implementation of the priority queue is done using linked lists?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
77
Running key cipher is harder to decipher than keyword cipher.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
78
Including a parity bit along with the data surely detects the errors.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
79
What is the time complexity of the recursive implementation used to convert a decimal number to its binary equivalent?
#include<stdio.h>
int arr[31], len = 0;
void recursive_dec_to_bin(int n)
{
      if(n == 0 && len == 0)
      {
          arr[len++] = 0;
          return;
      }
      if(n == 0)
         return;
      arr[len++] = n % 2;
      recursive_dec_to_bin(n/2);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
80
What is the time complexity for finding a Hamiltonian path for a graph having N vertices (using permutation)?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board