Q541
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
28/59
Page
Pick an option on a question to see the right answer and solution.
Q541
Open questionSelect an option to see the answer and solution.
Q542
Open questionSelect an option to see the answer and solution.
Q543
Open questionOptions are not available for this question.
Select an option to see the answer and solution.
Q544
Open questionSelect an option to see the answer and solution.
Q545
Open questionSelect an option to see the answer and solution.
Q546
Open questionSelect an option to see the answer and solution.
Q547
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,0}, n = 7, 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.
Q548
Open questionSelect an option to see the answer and solution.
Q549
Open questionSelect an option to see the answer and solution.
Q550
Open questionSelect an option to see the answer and solution.
Q551
Open questionSelect an option to see the answer and solution.
Q552
Open questionSelect an option to see the answer and solution.
Q553
Open questionSelect an option to see the answer and solution.
Q554
Open questionSelect an option to see the answer and solution.
Q555
Open questionSelect an option to see the answer and solution.
Q556
Open questionSelect an option to see the answer and solution.
Q557
Open questionSelect an option to see the answer and solution.
Q558
Open question#include <iostream>
#include <string>
using namespace std;
void func1(string input,string output)
{
if(input.length()==0)
{
cout<<output<<",";
return;
}
for(int i=0;i<=output.length();i++)
func1(input.substr(1),output.substr(0,i) + input[0] + output.substr(i));
}
int main()
{
char str[] = "AB";
func1(str, "");
return 0;
}Select an option to see the answer and solution.
Q559
Open questionSelect an option to see the answer and solution.
Q560
Open questionSelect an option to see the answer and solution.