Hi guys.
Welcome back.
In this session we are going to learn about functions in C programming language function is a block
of code that performs a specific task.
Okay suppose you are building an application in C language and you know not your program.
You need to perform some specific tasks more than once or twice in such case you have two options.
Use the same set of statements every time you want to perform the task.
Are create a function to perform that task and just call it every time you need to perform the task.
OK so obviously Option B is a good practice and a good programmer always uses a function of the writing
code in C because if you keep on writing the same sorts of code again Again it's difficult to maintain
for like because it's you because you're going to perform the same task and they feel if you don't want
to write the function and if you want to use a block of statements you're going to get to know the program
history to repeated later tonight it's not a good practice to write the scenes source code again again
so instead C is offering a concept called function where you can write that source code on that task
on that particular statements in a small function and just call it whatever it is required.
So it's a good practice to write function going to learn about types of functions.
Okay.
So basically there are two types of function.
The first one is standard library functions are the way we can call it as in Bill functions.
Okay.
The standard library functions are a built in functions in C programming language for example like this
disputes to get superintend scan of et cetera.
These are the functions which are already had a definition that had reference like dot hedge funds like
a studio or hedge.
So we just call them but no there is a need to use them.
Okay.
So this all provided by C language which can just add this high profile on top of the C program so we
can just ignore it when we are getting executive actually.
So line B functions which are often B C language which we can use just by including the interface.
Okay so the second type is called as I use a different function.
So these are different functions are nothing but a function which are written by the users actually.
I mean by as like based on our own requirement.
Okay.
So you can also create functions but you need SAS functions created by the user are known as using different
functions.
Okay.
So what are the advantages of using different functions.
The program will be easier to understand we can debug and reasonable cause that can be used in other
programs a large program can be divided into small modules hence a large project can be divided among
many programmers.
Okay so the main object of using function is right.
You need to repeatedly use the same source code to perform a specific task actually.
So you just write a function and just call them wherever you're required actually so by doing this you
know you're really using the reusable lines of code.
And also it's clever quite smart.
The final problem being the programming end is a good practice to write the functions and a stuff of
multiple integrating my devastating statements to perform the same kind of task.
OK so we will see for David the help of a programmer.