FUNCTION
FUNCTION
IN
C- Programming”
FUNCTION
TYPE
PRE- USER
DEFINED DEFINED
PREDEFINED FUNCTION:-
• These are predefined function in c compiler
and their definitions are already available in
header file.
• Example- printf(), scanf(), pow().
• When ever we want to use these the function,
instead of writing the whole code we just
need to include the header file.
USER DEIFINE FUNCTION:-
• These are those function which are created by
user
User define function are of four type:-
1. No Argument No Return Type.
2. No Argument With Return Type.
3. With Argument No Return Type.
4. With Argument With Return Type.
WHAT ARE ARGUMENTS?
These are the data values which are passed from
the caller function to the called function.
TYPES OF ARGUMENTS:-
1. Actual Arguments.
2. Formal arguments
HOW FUNCTION WORKS
• Statement in the function are not executed
until the function is called
• A function can be called by any other function.
• A function which is calling any other function
is known as caller function.
• A function which is being called is known as
called function
ON OFF CH ++/CH -- VOL++/VOL--
{ { { {
---------; ---------; ---------; ---------;
---------; ---------; ---------; ---------;
---------; ---------; ---------; ---------;
---------; ---------; ---------; ---------;
---------; ---------; ---------; ---------;
---------; ---------; ---------; ---------;
---------; ---------; ---------; ---------;
--------; --------; --------; --------;
---------; ---------; ---------; ---------;
} } } }
ON OFF
CH+ VOL+
CH- VOL-
THANK YOU…!!