Q841
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
43/59
Page
Pick an option on a question to see the right answer and solution.
Q841
Open questionSelect an option to see the answer and solution.
Q842
Open questionSelect an option to see the answer and solution.
Q843
Open questionSelect an option to see the answer and solution.
Q844
Open questionSelect an option to see the answer and solution.
Q845
Open questionSelect an option to see the answer and solution.
Q846
Open questionSelect an option to see the answer and solution.
Q847
Open questionSelect an option to see the answer and solution.
Q848
Open questionSelect an option to see the answer and solution.
Q849
Open questionSelect an option to see the answer and solution.
Q850
Open questionSelect an option to see the answer and solution.
Q851
Open question#include<stdio.h>
int recursive_get_len(char *s, int len)
{
if(s[len] == 0)
return 0;
return 1 + recursive_get_len(s, len+1);
}
int main()
{
char *s = "abcdef";
int len = recursive_get_len(s,0);
printf("%d",len);
return 0;
}Select an option to see the answer and solution.
Q852
Open questionSelect an option to see the answer and solution.
Q853
Open questionSelect an option to see the answer and solution.
Q854
Open questionSelect an option to see the answer and solution.
Q855
Open questionint fact(int n)
{
if(n == 0)
return 1;
return n * fact(n - 1);
}
int main()
{
int n = 5;
int ans = fact(n);
printf("%d",ans);
return 0;
}Select an option to see the answer and solution.
Q856
Open question#include<stdio.h>
int get_max_element(int *arr,int n)
{
int i, max_element = arr[0];
for(i = 1; i < n; i++)
if(arr[i] > max_element)
max_element = arr[i];
return max_element;
}
int get_min_element(int *arr, int n)
{
int i, min_element;
for(i = 1; i < n; i++)
if(arr[i] < min_element)
min_element = arr[i];
return min_element;
}
int main()
{
int n = 7, arr[7] = {1,1,1,0,-1,-1,-1};
int max_element = get_max_element(arr,n);
int min_element = get_min_element(arr,n);
printf("%d %d",max_element,min_element);
return 0;
}Select an option to see the answer and solution.
Q857
Open questionSelect an option to see the answer and solution.
Q858
Open questionSelect an option to see the answer and solution.
Q859
Open questionSelect an option to see the answer and solution.
Q860
Open questionSelect an option to see the answer and solution.