Example: Function as Parameter
Output
Hello John Hello Jack Hello Sara
In the above program, there are two functions: name() and greet().
- The
name()function takes two parameters. - The
greet()function is passed as an argument to thename()function.