41. Hill cipher is an example of . . . . . . . .
42. What is the running time of naive matrix multiplication algorithm?
43. Encryption in running key cipher is done using . . . . . . . .
44. Which of the following gives the value for Ø(180)?
45. You have to find the sum of digits of a number given that the number is always greater than 0. Which of the following base cases can replace the base case for the below code?
#include<stdio.h>
int recursive_sum_of_digits(int n)
{
if(n == 0)
return 0;
return n % 10 + recursive_sum_of_digits(n/10);
}
int main()
{
int n = 1201;
int ans = recursive_sum_of_digits(n);
printf("%d",ans);
return 0;
}
#include<stdio.h>
int recursive_sum_of_digits(int n)
{
if(n == 0)
return 0;
return n % 10 + recursive_sum_of_digits(n/10);
}
int main()
{
int n = 1201;
int ans = recursive_sum_of_digits(n);
printf("%d",ans);
return 0;
}
46. Which of the following cipher is formed by applying columnar transposition cipher twice?
47. Placing n-queens so that no two queens attack each other is called?
48. What is the purpose of using square root decomposition?
49. What is the message length 'k' of a Hamming(7,4) code?
50. What will be the time complexity of the following code?
#include <stdio.h>
#include <math.h>
void PowerSet(char *set, int set_size)
{
unsigned int pow_size = pow(2, set_size);
int count, j;
for(count = 0; count < pow_size; count++)
{
for(j = 0; j < set_size; j++)
{
if(count & (1<<j))
printf("%c", set[j]);
}
printf(",");
}
}
int main()
{
char strset[] = {'a','b','c'};
PowerSet(strset, 3);
return 0;
}
#include <stdio.h>
#include <math.h>
void PowerSet(char *set, int set_size)
{
unsigned int pow_size = pow(2, set_size);
int count, j;
for(count = 0; count < pow_size; count++)
{
for(j = 0; j < set_size; j++)
{
if(count & (1<<j))
printf("%c", set[j]);
}
printf(",");
}
}
int main()
{
char strset[] = {'a','b','c'};
PowerSet(strset, 3);
return 0;
}
Read More Section(Miscellaneous on Data Structures)
Each Section contains maximum 100 MCQs question on Miscellaneous on Data Structures. To get more questions visit other sections.
- Miscellaneous on Data Structures - Section 1
- Miscellaneous on Data Structures - Section 2
- Miscellaneous on Data Structures - Section 3
- Miscellaneous on Data Structures - Section 4
- Miscellaneous on Data Structures - Section 5
- Miscellaneous on Data Structures - Section 6
- Miscellaneous on Data Structures - Section 7
- Miscellaneous on Data Structures - Section 9
- Miscellaneous on Data Structures - Section 10
- Miscellaneous on Data Structures - Section 11
- Miscellaneous on Data Structures - Section 12