 Dear learner, today I am going to discuss one most important topic of C programming, that is functions. I will discuss mainly the need of functions, then I will give a brief introduction of functions, after that I will discuss the types of functions and various concepts associated with functions like function declaration, function definition, function call, function parameters and return statement. Now I am going to discuss the need of functions in programming. There are various uses of functions in programming, some of them are to improve the readability of the code. Splitting a large program into separate functions make the program more readable and maintainable. Functions also improves the reusability of the code. If a particular task is required at multiple places in a program, then rather than writing the same code again and again, we create a function and call it whenever necessary. Thus it also reduces the size of the code. It is also easy to debug a small sub-program or functions rather than large programs. Now let me define what is a function. C language enables programmer to break up a program into segments commonly known as functions. A function is a group of statements which is used to perform a specific task. C program generally consists of many small functions and a function has mainly function name, return type, parameter list and function body. Now what is function name? A meaningful function name is referable in programming so that it would be easy to understand the purpose of the function and it would be easy to understand the purpose of the function just seeing its name. So function name is very important. The function name and the parameter list together constitute the function header. Now what is return type? The return type is the data type of the value the function returns. A function may or may not return a value. Return type can be any data type like integer, float, character, etc. When a function returns nothing then the return type will be void. Now I am coming to parameter list. The parameter list refers to the data type, order and number of parameters of a function. Parameters are optional. A function may contain no parameters. Then what is function body? The function body contains a collection of statements that defines what the function does. That means the main working of a function is defined in the function body part. In C programming there are mainly two kinds of functions. One is built-in function and other is user defined function. Built-in function is also known as library functions. Now what is built-in function or library function? Library functions are the functions which already have a definition in header files. So we just call them whenever there is a need to use them. Header files are required to be included for using library functions in a program. Programmers do not have to write code to implement the library functions. There are various library functions defined in the header file. For example, in the header file stdio.h, there are library functions like printf, scanf, etc. Similarly, in the header file string.h, there are many library functions like stringcat, stringreverse, stringlang, stringcompare, etc. In the header file conio.h, that means configuration input-output header file, there are many functions like clearScreen for clearing the screen, gatesys, etc. For using mathematical functions, we have library functions in the header file mat.h, like power. For power function, we have to use pow, then square function for finding the square, and various deconometric functions are available in the header file mat.h. These are library functions. Now what is user defined functions? The functions that we create in a program are known as user defined functions. We have seen almost all programs in C programming. The main function is a user defined function except the name of the function and the number of arguments and argument types are not user defined. And main is an example of user defined function. And program execution starts from the main function. Today I will discuss how to create user defined functions and how to use them in C programming. Now I am going to discuss function declaration. Function declaration is also referred to as function prototype. A function declaration provides the following information to the compiler. It gives the name of the function, the type of the value return, the number and the type of the arguments that must be supplied in a function call of the function. Now let me take one example how to declare a function. Now let me discuss what is function declaration. This is the syntax of a function prototype and function declaration. Here I have written the return type first, then function name, then parameterly separated by commas. And after that I have used one semicolon. In a function declaration or function prototype this semicolon is very necessary. Here I have given three examples of function declaration statement. In the first statement the function name is sum, return type is integer and the parameter list contains two parameters separated by comma. And after this declaration statement one semicolon is given. In the second statement return type is integer, function name is maximum and there are three parameters in the parameter list and it will give the maximum of three numbers. In the third function declaration return type is flow and it will add three numbers having decimal points. So the type of these parameters are written flow. And after the ending of this declaration one semicolon is used. This is the way of declaring a function. Now I am coming to function definition part. A function definition comprises of mainly two parts. One is function header and the second one is function body. The first line of the function definition is called function header. Function body contains the statements to perform the desired task. Function body is enclosed within second bracket and is composed of statements that make up the function. The function header and function declaration must use the same function name, number of arguments, types of arguments and the return type. Now I am going to write the syntax of function definition. Here I have written the syntax of defining a function. First I have used return type then function name after that the list of parameters, data type. I have to give the data type of the parameters. Data type then variable name, data type then variable name like this. After that within second bracket I have given local variables. I have to define the local variables. Then statements inside the function and after that after doing the calculation or anything then the value will be return with this statement return statement. Then we have to specify the variable where the result is stored and this value is returned to the call function. This is the syntax of function definition. I have written one example of defining a function. Here some function is defined in this definition return type is integer. Then function name then to variable name. That means in parameter list there are two variables. Then this is the local variable i.e. s. s is the local variable where I have stored the addition of these two values. Addition of values stored in this variable a and b will be stored in this variable s and the result stored in variable s is returned with the input this return statement. Now I am coming to function call. A function call is specified by the function name followed by the values of the parameters enclosed within a parenthesis and it is terminated by semicolon. The list of variables used in function call is known as actual parameter list. The actual parameter list may contain variable names, expressions or constant. If the return type is not void then the value returned by call function may be assigned to some variable. Now I am going to discuss what is function parameters. Function parameters are the means of communication between calling and the call function. C functions extends information by means of parameters. Parameters are classified as formal parameters and actual parameters. Now what is formal parameters? The parameters which appear in the first line of the function definitions are referred to as formal parameters. Formal parameters are local variables which are assigned values from the arguments when the function is called. Now what is an actual parameter? When a function is called the values that are passed in the call are called the actual parameters. At the time of the call is actual parameter is assigned to the corresponding formal parameters in the function definition. It may be expressed in constant single variable or more complex expression. However, each actual parameter must be of the same data type as its corresponding formal parameters. Now let me explain it with an example. Here I have retained the syntax of function call. We have to specify the name of the function, then the variables. These variables are known as extra parameters. After that I have used a semicolon in the function call segment. This is the syntax of function call. And there are some examples of function call. In the first example add a function and there are two variables. In the second function call segment this is the function name. I have not specified any variable name inside this bracket because this function returns nothing. So return type is 5. So here I have not mentioned any variable names. In the third function call segment there are three variables x, y and z. These are the extra parameters. These all are extra parameters. The parameters we use in function call are known as extra parameter and the parameters used in function definition between the function header are formal parameters. Now I am coming to return segment. The return segment is used to terminate the execution of a function and returns control to the calling function. For returning any value we have to use the keyword return and after that within the first bracket we have to specify the variable name. Now I am going to write the syntax of return segment in function. This is the syntax of return segment. First we have to use this keyword return then variable name. Variable name can be expression. In this syntax here I have given within the first bracket expression is used. One example of this type of return segment is this one. Return a into b. The multiplication of these two variables is returned to the calling function. In this example result is returned to the call function. Here the maximum value of the variable is stored in the maximum and this maximum is returned to the call function. Now here as I already told the x a into b is returned to the main function. This is the syntax of return segment. Today I have discussed how to declare a function, how to call a function, how to define a function. I have also discussed the types of parameters in a function, formal and actual parameters. In my next presentation I will discuss how to call by value and call by reference in function and I will come with some more complex examples of functions. Thank you.