0 votes 0 votes What is the output of the following program? int fun (int z) { if( z==0 || z==1 ) return 1; else return fun(z-1) ; } int main() { int y; y=fun(8); printf(“%d”, y) ; } $1$ $36$ $8$ $40$ Programming in C tbb-programming-2 + – Bikram asked May 14, 2017 • edited Aug 19, 2019 by Counsellor Bikram 231 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes ans A every time the fun(z) is just either calling fun(z-1) or returning 1 hence the output doesn’t depend on the value of z it will always return 1 , for every non negative z JAINchiNMay answered Jun 14, 2021 JAINchiNMay comment Share Follow See all 0 reply Please log in or register to add a comment.