Nesting of function call in C programming

Nesting of function call in c programming

If we are calling any function inside another function call is known as nesting function call. Sometime it converts a difficult program in easy one.
For example:
Try to find out maximum number among the five different integers without using nested function call.

Find the maximum number among five different integers using nested function call:

int max(int x,int y){return x>y?x:y;}
void main(){
    int m;

Output: 11  


Anonymous said...

it is recursion not nesting of function.

Zach Farmer said...

No, recursion would be calling max() from within max(). This is not what he is doing here; this is a nested function call.