Set-26 C MCQ

C MCQ Set-12 : Multiple Choice Questions in C Set-12

1. What will be the output of the following code?void my_recursive_function(int n){if(n == 0){printf(“False”);return;}if(n == 1){printf(“True”);return;}if(n%2==0)my_recursive_function(n/2);else{printf(“False”);return;} }int main(){my_recursive_function(100);return 0;} a) Trueb) Falseb)compilation errord)run time error Answer:b 2. What is the output of the following code?int 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’ || …

C MCQ Set-12 : Multiple Choice Questions in C Set-12 Read More »