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
Explain how can I avoid the abort, retry, fail messages?
When is a null pointer used?
Do variables need to be initialized?
Which is better malloc or calloc?
What are register variables in c?
What are register variables? What are the advantage of using register variables?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
What is const volatile variable in c?
what is the syallabus of computer science students in group- 1?
What are enumerated types?
What is the use of volatile?
Is it better to use malloc() or calloc()?
can any one provide me the notes of data structure for ignou cs-62 paper
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What is a function in c?