Chapter 4 Programming In C
CONCEPT OF RECURSION: FACTORIAL AND FIBONACCI PROBLEMS • Recursion is the process of calling a function repeatedly itself until some specified condition has been satisfied. • When you use the recursion function in a program, you need to define an exit condition, otherwise, it will go into an infinite loop. • Recursive functions are very useful to solve many mathematical problems like calculating the factorial of a number, generating the Fibonacci series, etc. Pointer (v-imp) Pointers in C are similar to as other variables that we use to hold the data in our program but, instead of containing actual data, they contain a pointer to the address (memory location) where the data or information can be found. These is an important and advance concept of C language since, variables names are not sufficient to provide the requirement of user while developing a complex program. However, use of pointers help to access memory address of that entities globally to ...