ABSTRACT

In C, a function is an independent block of code that performs a specific task when called, and it may return a value. Each function is essentially a small program, with its own variables and statements. Functions may exist in separate files that are compiled separately. Using functions, a program is divided into smaller parts, making it easier to understand, control, and modify. Functions are reusable. For example, the printf() and scanf() functions can be used in every C program. In addition, functions allow us to avoid duplicating the same code. A function declaration, which is also called function prototype, specifies the name of the function, its return type, and a list of parameters if present. A function can be called as many times as needed. When a function is called, the execution of the program continues with the execution of the function's code. This chapter discusses Local, Global and Static variables used in function declaration.