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
what are bit fields in c?
Why do we need functions in c?
What is getch() function?
What are the functions to open and close the file in c language?
Explain heap and queue.
What are type modifiers in c?
Explain what is the difference between functions getch() and getche()?
What are the advantages of c language?
What is auto keyword in c?
What is time complexity c?
What does stand for?
What does the error message "DGROUP exceeds 64K" mean?
List the difference between a While & Do While loops?
What is unsigned int in c?
What is the size of a union variable?