What is nesting of functions?

Last updated on June 13th, 2020 at 08:26 pm




Nesting of functions : In C, each function can contain one or more than one function in it. There is no limit as to how deeply functions can be nested. Consider the following example,




function main(){
function01();
}

function function01(){
function02();
}

function function02(){
//do something more here.
}

In the above example, The main() function contains function01(), the function01() contains function02 and so on. This is nesting of functions.

Leave a Reply

Your email address will not be published. Required fields are marked *