Lecture Fucntions
Lecture Fucntions
User-Defined Functions
2
It is necessary to declare
the prototype of every
function that we intend to
define in the program.
Function 3
A function is a self-contained block of statements
that performs a particular specified task.
Function with
argument &
Library return values
Function Function with
Type of
Function argument & no
User-defined return values
Functions Function with
no argument &
return values
Function with
no argument &
no return values
Control Flow in 4
a multi-function
program
Advantages of Function 5
Manageability
Code Reusability
Non-redundant Programming
Logical Clarity
Easy to divide the work among programmers
Library Functions 6
(Built-in Functions)
Library functions in C language are inbuilt functions
which are grouped together and placed in a
common place called library.
Function Definition
Function Declarator & Function Body
Function Declaration or Prototype
Return Statement
Accessing/Calling a function
Function Parameters (Arguments)
Function Definition 9
of Variables
1. Automatic Variables,
2. External Variables,
3. Static Variables,
4. Register Variables
Automatic Variables 26