Search Results

Search found 1 results on 1 pages for 'ckarthickit'.

Page 1/1 | 1 

  • stack of a c program

    - by ckarthickit
    how the stack would look like for the following program if I give input as 5. #include <stdio.h> int fibonacci(int number) { int retval; if (0 == number){ return 0; } if (1 == number){ return 1; } return(fibonacci(number-1) + fibonacci(number-2)); } int main() { int number = 0; int fibvalue = 1; while (1){ printf("please enter the number\n"); scanf("%d", &number); fibvalue = fibonacci(number); printf("computed fibonacci value %d\n", fibvalue); } return 1; } also give me links where i can learn about it

    Read the article

1