ExamVeda
Login
Home
71
For which device was Morse code developed for?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
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?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
73
Which of the following statement is incorrect with respect to generalizing the solution using the inclusion-exclusion principle?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
74
Which of the following cipher is easiest to crack?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
75
Under what condition any set A will be a subset of B?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
76
Suppose the first fibonnaci number is 0 and the second is 1. What is the sixth fibonnaci number?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
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; 
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
78
When was the first solution to Eight Queen Puzzle published?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
79
What will be the chromatic index of the following graph?
Miscellaneous on Data Structures mcq question image
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
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?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board