2 * This simple classical example of recursion is useful for
3 * testing stack backtraces and such.
12 main (int argc
, char **argv
, char **envp
)
15 printf ("%d\n", factorial (1)); /* commands.exp: hw local_var out of scope */
18 printf ("usage: factorial <number>\n");
21 printf ("%d\n", factorial (atoi (argv
[1])));
27 int factorial (int value
)
32 value
*= factorial (value
- 1);
36 } /* commands.exp: local_var out of scope */
This page took 0.031184 seconds and 4 git commands to generate.