Write a program using simple function and parameterized function
Answers
Functions in C Programming
A function exists in almost all programming languages. As the word suggests, a function is a group of statements clubbed together to perform a particular task. Each function is accompanied by a set of parenthesis, the opening bracket ( and the closing bracket ). There may be a group of variable declarations called parameters inside these parenthesis. We will come to the detailed explanation of this as we move forward with the lesson. Please note that a function can also be termed as a subroutine or a procedure.
Types of Functions
Functions can be broadly categorized into two major types: user defined functions and built-in functions.
You may have used some built-in functions in C without realizing that it's a function. For example, the strcat() is a built-in function provided by C standard library, which allows you to concatenate two strings. User defined functions are functions defined by the user or the person writing the program. If you recall, the main() is also a function but is often coined as neither a user-defined function, not a built-in function or in some way behaves as both.