Aptitude
February 22, 2025NTA UGC NET Aug 2024 Paper-2
February 24, 2025NTA 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); ?
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); ?
25 | |
23 | |
24 | |
27 |
Correct Answer: D