ExamVeda
Login
Home
31
Floyd's cycle detection algorithm is a pointer algorithm.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
32
What is meant by the single dot in Morse code?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
33
How many columns do we need to have 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 C
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 columns in the grid corresponds to the length of the keyword.

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

Steps to Determine Number of Columns:
Step 1: Determine the length of the keyword:
The keyword "SECRET" has 6 letters.

Step 2: The number of columns in the table used for encryption is equal to the length of the keyword.
In this case, since the keyword has 6 letters, we will have 6 columns.

Conclusion:
The number of columns needed in the table for encryption using the columnar transposition cipher with the keyword "SECRET" is:
Option C: 6
34
Which symbol is not defined inside the ITU recommendation on Morse code?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
35
Is the letter "E" represented by the single dot in Morse code?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
36
What will be the time complexity of given code?
#include <bits/stdc++.h> 
using namespace std;  
void convert(int a[], int n) 
{ 	
	vector <pair<int, int> > vec; 	
	for (int i = 0; i < n; i++) 
		vec.push_back(make_pair(a[i], i)); 	
	sort(vec.begin(), vec.end()); 	
	for (int i=0; i<n; i++) 
		a[vec[i].second] = i; 
} 
void printArr(int a[], int n) 
{ 
	for (int i=0; i<n; i++) 
		cout << a[i] << " "; 
} 
int main() 
{ 
	int arr[] = {10,8,2,5,7}; 
	int n = sizeof(arr)/sizeof(arr[0]); 	
	convert(arr , n); 
   	printArr(arr, n); 
	return 0; 
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
37
In which of the below cases will the following code produce a wrong output?
int recursive_binary_search(int *arr, int num, int lo, int hi)
{
      if(lo > hi)
       return -1;
      int mid = (lo + hi)/2;
      if(arr[mid] == num)
       return mid;
      else if(arr[mid] < num)
          lo = mid + 1;
      else
          hi = mid - 1;
      return recursive_binary_search(arr, num, lo, hi);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
38
Which of the following gives the sum of the first n natural numbers?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
39
Which of the following is a difference between beaufort cipher and vigenere cipher?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
40
Which of the following cipher is created by shuffling the letters of a word?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board