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 is #line in c?
Why c is a mother language?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
What is time null in c?
What are identifiers and keywords in c?
Explain #pragma statements.
Does sprintf put null character?
What is data type long in c?
Explain what is the best way to comment out a section of code that contains comments?
What is the meaning of 2d in c?
What is external variable in c?
What are register variables in c?
What are the different types of pointers used in c language?
What language is lisp written in?
What is linear search?