/************************************************************** * program: fib.c * * description: recursive fibinochi function * * author: Phil White **************************************************************/ #include int fib( int num ){ if ( num <= 1 ){ return 1; }else{ return fib( num - 1 ) + fib( num - 2 ); } } int main(int argc, char *argv[]) { int res; int num = 7; res = fib( num ); // Note you should make sure the answer to fib is someplace // that I can see it in your trace printf("fib(0x%x) is: 0x%x\n",num, res ); return 0; }