1,146 views
2 votes
2 votes

What will be output of the program?

int d=0;
int f(int a,int b){
    int c;
    d++;
    if(b==3)
    return a*a*a;
    else{
        c=f(a,b/3);
        return(c*c*c);
    }
}

int main(){
    printf("%d",f(4,81));
    return 0;
}

 

Please log in or register to answer this question.

Related questions

3 votes
3 votes
0 answers
2
Asim Abbas asked Jan 11, 2018
436 views
Answer of this question is given as (C), but I am not able to get it how. Can any1 please explain this?
1 votes
1 votes
0 answers
3
0 votes
0 votes
1 answer
4
Hemant Parihar asked Feb 3, 2017
519 views
#include<stdio.h>int main() { char *p; p = "%d\n"; p++; p++; printf(p-2, 400); return 0;}Output : 400I ran this program and got 400 as output. But I don...