ExamVeda
Login
Home
31
How many rows will the letters of the plain text occupy in the table, that is used for encryption in columnar transposition cipher when a given keyword is "SECRET" and plain text is "DATASTRUCTURE"?
Discuss
Answer & Solution
Answer: Option B
Solution:
Columnar Transposition Cipher: In a columnar transposition cipher, the plaintext is written into a grid based on the length of the keyword. The number of rows in the grid is determined by how many times the plaintext must be written to fit into the grid.

Given:
Keyword: "SECRET"
Plaintext: "DATASTRUCTURE"

Step 1: Determine the length of the keyword:
The keyword "SECRET" has 6 letters.

Step 2: Divide the length of the plaintext by the length of the keyword to find out how many rows are needed:
The plaintext "DATASTRUCTURE" has 13 letters.

Step 3: Calculate the number of rows required:
Divide 13 (length of plaintext) by 6 (length of keyword):
13 / 6 = 2 with a remainder of 1.
This means we need 2 full rows and one additional row to accommodate the remainder.

Conclusion:
Therefore, the letters of the plaintext will occupy a total of 3 rows in the table used for encryption.
Option C: 3
32
Which of the following can be the base case for the recursive implementation used to find the length of linked list?
#include<stdio.h>
#include<stdlib.h>
struct Node
{
      int val;
      struct Node *next;
}*head;
int get_len()
{
      struct Node *temp = head->next;
      int len = 0;
      while(temp != 0)
      {
          len++;
          temp = temp->next;
      }
      return len;
}
int main()
{
      int arr[10] = {1,2,3,4,5}, n = 5, i;
      struct Node *temp, *newNode;
      head = (struct Node*)malloc(sizeof(struct Node));
      head->next = 0;
      int len = get_len();
      printf("%d",len);
      return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
33
How many iterating statements are involved in the naive method of matrix multiplication?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
34
Calculating the chromatic number of a graph is a
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
35
What will be the size of a key matrix if the plain text is "SECRET"?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
36
What is the simplest method to prove that a graph is bipartite?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
37
How many times is the function linear_search() called when the following code is executed?
#include<stdio.h>
#include<stdlib.h>
struct Node
{
     int val;
     struct Node* next;
}*head;
int linear_search(struct Node *temp,int value)
{
      if(temp == 0)
         return 0;
      if(temp->val == value)
         return 1;
      return linear_search(temp->next, value);
}
int main()
{
     int arr[6] = {1,2,3,4,5,6};
     int n = 6,i;
     head = (struct Node*)malloc(sizeof(struct Node));
     head->next = 0;
     struct Node *temp;
     temp = head;
     for(i=0; i<n; i++)
     {
           struct Node *newNode = (struct Node*)malloc(sizeof(struct Node));
           newNode->next = 0;
           newNode->val = arr[i];
           temp->next = newNode;
           temp = temp->next;
     }
     int ans = linear_search(head->next,6);
     if(ans == 1)
       printf("Found");
     else
       printf("Not found");
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
38
Which of the following cipher requires only one key for decoding the ciphered text?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
39
Can stable marriage cannot be solved using branch and bound algorithm.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
40
Which of the following cipher uses a key book or a key text instead of a keyword?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board