...
Aptitude
February 22, 2025
NTA UGC NET Aug 2024 Paper-2
February 24, 2025
Aptitude
February 22, 2025
NTA UGC NET Aug 2024 Paper-2
February 24, 2025

NTA UGC NET Aug 2024 Paper-2

Question 23
Consider the function in C code :
Cal(a, b) {
if(b!=1){
if(a!=1){
printf(“*”);
Cal(a/2,b);
}
else{
b=b-1;
Cal(10,b);
}
}}
How many times * is going to be printed, if the function is called with Cal(10, 10); ?
A
25
B
23
C
24
D
27
Correct Answer: D

Leave a Reply

Your email address will not be published. Required fields are marked *