Q621
Open question
Select 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
32/59
Page
Pick an option on a question to see the right answer and solution.
Q621
Open question
Select an option to see the answer and solution.
Q622
Open questionSelect an option to see the answer and solution.
Q623
Open questionSelect an option to see the answer and solution.
Q624
Open question#include<stdio.h>
int get_len(char *s)
{
int len = 0;
while(s[len] != '\0')
len++;
return len;
}
int main()
{
char *s = "";
int len = get_len(s);
printf("%d",len);
return 0;
}Select an option to see the answer and solution.
Q625
Open questionSelect an option to see the answer and solution.
Q626
Open questionPick up all the vertices of _______
Repeat edges between the vertices until the graph has no odd degree
Repeat only pre-existing edgesSelect an option to see the answer and solution.
Q627
Open questionSelect an option to see the answer and solution.
Q628
Open questionSelect an option to see the answer and solution.
Q629
Open questionSelect an option to see the answer and solution.
Q630
Open questionSelect an option to see the answer and solution.
Q631
Open questionSelect an option to see the answer and solution.
Q632
Open questionSelect an option to see the answer and solution.
Q633
Open questionint cnt = 0;
void my_recursive_function(char *s, int i)
{
if(s[i] == '\0')
return;
if(s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u')
cnt++;
my_recursive_function(s,i+1);
}
int main()
{
my_recursive_function("thisisrecursion",0);
printf("%d",cnt);
return 0;
}Select an option to see the answer and solution.
Q634
Open questionSelect an option to see the answer and solution.
Q635
Open question#include <bits/stdc++.h>
using namespace std;
void convert(int a[], int n)
{
vector <pair<int, int> > vec;
for (int i = 0; i < n; i++)
vec.push_back(make_pair(a[i], i));
sort(vec.begin(), vec.end());
for (int i=0; i<n; i++)
a[vec[i].second] = i;
}
void printArr(int a[], int n)
{
for (int i=0; i<n; i++)
cout << a[i] << " ";
}
int main()
{
int arr[] = {10,8,2,5,7};
int n = sizeof(arr)/sizeof(arr[0]);
convert(arr , n);
printArr(arr, n);
return 0;
}Select an option to see the answer and solution.
Q636
Open questionSelect an option to see the answer and solution.
Q637
Open questionSelect an option to see the answer and solution.
Q638
Open question#include<stdio.h>
int cnt = 0;
int recursive_search_num(int *arr, int num, int idx, int len)
{
int cnt = 0;
if(idx == len)
return cnt;
if(arr[idx] == num)
cnt++;
return cnt + recursive_search_num(arr, num, idx+1, len);
}
int main()
{
int arr[8] ={0,0,0,0,3,5,-6,7},num = 0,len = 8;
int ans = recursive_search_num(arr,num,0,len);
printf("%d",ans);
return 0;
}Select an option to see the answer and solution.
Q639
Open questionSelect an option to see the answer and solution.
Q640
Open questionstruct Node
{
int val;
struct Node* next;
}*head;
int get_min()
{
struct Node* temp = head->next;
int min_num = temp->val;
while(temp != 0)
{
if(_________)
min_num = temp->val;
temp = temp->next;
}
return min_num;
}
Which of the following lines should be inserted to complete the above code?Select an option to see the answer and solution.