i want explaination about the program and its stack reprasetaion

fibbo(int n)
{
if(n==1 or n==0)
return n;
else
return fibbo(n-1)+fibbo(n-2);
}
main()
{
fibbo(6);
}

Answer Posted / vignesh1988i

here the return function will give an error message or it
will only take the first function (ie) fibbo(n-1) since
after return this is the first recursive function
called.... so this altast return 1 to the main program....
that's all.... as for as i know this will be the
procedure...... and then the "or" must not be used .. only
logicalOR must be used ||.........

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are bit fields in c?

599


Why do we need functions in c?

551


What is getch() function?

645


What are the functions to open and close the file in c language?

589


Explain heap and queue.

577






What are type modifiers in c?

619


Explain what is the difference between functions getch() and getche()?

601


What are the advantages of c language?

662


What is auto keyword in c?

787


What is time complexity c?

562


What does stand for?

590


What does the error message "DGROUP exceeds 64K" mean?

724


List the difference between a While & Do While loops?

630


What is unsigned int in c?

551


What is the size of a union variable?

596