71. For which device was Morse code developed for?
72. Consider the following recursive implementation to find the largest element in a linked list:
struct Node
{
int val;
struct Node* next;
}*head;
int max_of_two(int a, int b)
{
if(a > b)
return a;
return b;
}
int recursive_get_max(struct Node* temp)
{
if(temp->next == 0)
return temp->val;
return max_of_two(______, _______);
}
Which of the following arguments should be passed to the function max_of two() to complete the above code?
struct Node
{
int val;
struct Node* next;
}*head;
int max_of_two(int a, int b)
{
if(a > b)
return a;
return b;
}
int recursive_get_max(struct Node* temp)
{
if(temp->next == 0)
return temp->val;
return max_of_two(______, _______);
}
Which of the following arguments should be passed to the function max_of two() to complete the above code?73. Which of the following statement is incorrect with respect to generalizing the solution using the inclusion-exclusion principle?
74. Which of the following cipher is easiest to crack?
75. Under what condition any set A will be a subset of B?
76. Suppose the first fibonnaci number is 0 and the second is 1. What is the sixth fibonnaci number?
77. What will be the output for the given code?
#include <stdio.h>
bool func (int arr[], int n)
{
int sum = 0;
int i, j;
for (i = 0; i < n; i++)
sum += arr[i];
if (sum%2 != 0)
return false;
bool partition[sum/2+1][n+1];
for (i = 0; i <= n; i++)
partition[0][i] = true;
for (i = 1; i <= sum/2; i++)
partition[i][0] = false;
for (i = 1; i <= sum/2; i++)
{
for (j = 1; j <= n; j++)
{
partition[i][j] = partition[i][j-1];
if (i >= arr[j-1])
partition[i][j] = partition[i][j] || partition[i - arr[j-1]][j-1];
}
}
return partition[sum/2][n];
}
int main()
{
int arr[] = {3, 3, 4, 4, 7};
int n = sizeof(arr)/sizeof(arr[0]);
if (func(arr, n) == true)
printf("true");
else
printf("false");
return 0;
}
#include <stdio.h>
bool func (int arr[], int n)
{
int sum = 0;
int i, j;
for (i = 0; i < n; i++)
sum += arr[i];
if (sum%2 != 0)
return false;
bool partition[sum/2+1][n+1];
for (i = 0; i <= n; i++)
partition[0][i] = true;
for (i = 1; i <= sum/2; i++)
partition[i][0] = false;
for (i = 1; i <= sum/2; i++)
{
for (j = 1; j <= n; j++)
{
partition[i][j] = partition[i][j-1];
if (i >= arr[j-1])
partition[i][j] = partition[i][j] || partition[i - arr[j-1]][j-1];
}
}
return partition[sum/2][n];
}
int main()
{
int arr[] = {3, 3, 4, 4, 7};
int n = sizeof(arr)/sizeof(arr[0]);
if (func(arr, n) == true)
printf("true");
else
printf("false");
return 0;
}
78. When was the first solution to Eight Queen Puzzle published?
79. What will be the chromatic index of the following graph?

80. If Matrix X is of order A*B and Matrix Y is of order C*D, and B=C then the order of the Matrix X*Y is A*D?
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 4
- Miscellaneous on Data Structures - Section 5
- Miscellaneous on Data Structures - Section 6
- Miscellaneous on Data Structures - Section 7
- Miscellaneous on Data Structures - Section 8
- Miscellaneous on Data Structures - Section 9
- Miscellaneous on Data Structures - Section 10
- Miscellaneous on Data Structures - Section 11
- Miscellaneous on Data Structures - Section 12