Q781
Open questionSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
1,171
Questions
40/59
Page
Pick an option on a question to see the right answer and solution.
Q781
Open questionSelect an option to see the answer and solution.
Q782
Open questionSelect an option to see the answer and solution.
Q783
Open question#include<stdio.h>
#include<stdlib.h>
struct Node
{
int val;
struct Node *next;
}*head;
int recursive_get_len(struct Node *current_node)
{
if(current_node == 0)
return 0;
return 1 + recursive_get_len(current_node->next);
}
int main()
{
int arr[10] = {-1,2,3,-3,4,5}, n = 6, i;
struct Node *temp, *newNode;
head = (struct Node*)malloc(sizeof(struct Node));
head->next = 0;
temp = head;
for(i=0; i<n; i++)
{
newNode = (struct Node*)malloc(sizeof(struct Node));
newNode->val = arr[i];
newNode->next = 0;
temp->next = newNode;
temp = temp->next;
}
int len = recursive_get_len(head->next);
printf("%d",len);
return 0;
}Select an option to see the answer and solution.
Q784
Open question
Select an option to see the answer and solution.
Q785
Open question#include<stdio.h>
int recursive_search_num(int *arr, int num, int idx, int len)
{
if(idx == len)
return -1;
if(arr[idx] == num)
return idx;
return recursive_search_num(arr, num, idx+1, len);
}
int main()
{
int arr[8] ={1,2,3,3,3,5,6,7},num=5,len = 8;
int indx = recursive_search_num(arr,num,0,len);
printf("Index of %d is %d",num,indx);
return 0;
}Select an option to see the answer and solution.
Q786
Open question
Select an option to see the answer and solution.
Q787
Open questionSelect an option to see the answer and solution.
Q788
Open questionSelect an option to see the answer and solution.
Q789
Open questionSelect an option to see the answer and solution.
Q790
Open questionSelect an option to see the answer and solution.
Q791
Open questionSelect an option to see the answer and solution.
Q792
Open questionStart traversing the graph using BFS traversal Pick up any vertex from the graph __________________________ Traverse one its edges Repeat until all the edges of the graph are covered
Select an option to see the answer and solution.
Q793
Open questionSelect an option to see the answer and solution.
Q794
Open questionSelect an option to see the answer and solution.
Q795
Open questionSelect an option to see the answer and solution.
Q796
Open questionSelect an option to see the answer and solution.
Q797
Open questionSelect an option to see the answer and solution.
Q798
Open questionSelect an option to see the answer and solution.
Q799
Open questionSelect an option to see the answer and solution.
Q800
Open questionSelect an option to see the answer and solution.