Testing and Modules

Testing

Unit Test Structure(a convention)

The Cycle of Writing a Unit Test

Final thoughts on TDD

Recursion

Memory Allocation In Recursion

When any function is called from main(), the memory is allocated to it on the stack. A recursive function calls itself, the memory for a called function is allocated on top of memory allocated to calling function and different copy of local variables is created for each function call. When the base case is reached, the function returns its value to the function by whom it is called and memory is de-allocated and the process continues.