SlideShare a Scribd company logo
“ FUNCTION”
By: Rishabh Agrawal
Content
 Introduction
 Syntax
 Program
 Types of Functions
 How the Function works?
 Function Prototypes
 Advantages of Function
 Conclusion
Introduction
 Function is a name block of statement that are executed
when it is called and performs a specific task.
 C program contain at least one function which is main().
 Basically a function is used to divide a large program of c
in many subprogram.
Syntax
For defining:-
return_type function_name(parameter_list)
{
statement(s)
}
For calling:-
function_name(argument_list)
Example for Syntax
For defining:-
// function for finding maximum from two no.
int max(int x, int y)
{
if(x>y)
return(x);
else
return(y);
}
Cont..
For calling:-
int main()
{
int x,y,m;
x=10;
y=5;
// function calling to get max value
m=max(x,y);
printf(“max value = %d”,m);
}
Program
int main()
{
int n,d;
printf("enter a numbern");
scanf("%d",&n);
d=fac(n);
printf(“factorial = %d",d);
}
int fac(int n)
{
int f;
for(f=1;n>=1;n--)
f=f*n;
return(f);
}
Types of Functions
They are two types of function:
1. Pre define function (Library function)
2. User define function
Pre define function (Library function)
A function that has already be define in the library of ‘C’
language or library developed by other programmer is
called Pre define function (Library function).
Ex:-
scanf, printf, puts, gets, etc.
User define function
A function define by the programmer itself that are called
User define function and it can be n number of function.
How the Function works?
 “C” program doesn't execute the statement in function until the
function is called.
 When function is called the program can send the function
information in the form of one or more argument.
 When the function is used it is referred to as the called
function.
 Functions often use data that is passed to them from the calling
function.
Cont..
 Data is passed from the calling function to a called function by
specifying the variables in a argument list.
 Argument list cannot be used to send data. Its only copy
data/value/variable that pass from the calling function.
 The called function then performs its operation using the copies
and either it may be return some value or not.
Function Prototypes
 Provides the compiler with the description of functions that
will be used later in the program
 Its define the function before it been used/called
 Function prototypes need to be written at the beginning of the
program.
 The function prototype must have : a return type indicating the
variable that the function will be return
 Syntax for Function Prototype
return_type function_name(parameter _list);
Advantages of Function
 It is much easier to write a structured program
where a large program can be divided into a
functions.
 Allowing the code to be called many times
 Easier to read and update
 It is easier to debug a structured program and easy
to find and fix error.
Conclusion
Function is a name block of statement which is used to performs
a specific task. A function is either call by value or by reference.
They are two types of function pre define or user define. A
function name is must be unique and it can be n no. of function
which can be called n no. times means there is no limit. For using
a function it is easy to write it, test it, and debug it.
Thank You

More Related Content

What's hot

Functions in C
Functions in CFunctions in C
Functions in C
Kamal Acharya
 
Function in c language(defination and declaration)
Function in c language(defination and declaration)Function in c language(defination and declaration)
Function in c language(defination and declaration)
VC Infotech
 
Functions in c
Functions in cFunctions in c
Functions in c
KavithaMuralidharan2
 
Lecture20 user definedfunctions.ppt
Lecture20 user definedfunctions.pptLecture20 user definedfunctions.ppt
Lecture20 user definedfunctions.ppt
eShikshak
 
Function in c program
Function in c programFunction in c program
Function in c program
umesh patil
 
Pre defined Functions in C
Pre defined Functions in CPre defined Functions in C
Pre defined Functions in C
Prabhu Govind
 
Presentation on function
Presentation on functionPresentation on function
Presentation on function
Abu Zaman
 
User Defined Functions in C
User Defined Functions in CUser Defined Functions in C
User Defined Functions in C
RAJ KUMAR
 
Function in C
Function in CFunction in C
Function in C
Dr. Abhineet Anand
 
Functions in c
Functions in cFunctions in c
Functions in c
reshmy12
 
User defined functions in C programmig
User defined functions in C programmigUser defined functions in C programmig
User defined functions in C programmig
Appili Vamsi Krishna
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
tanmaymodi4
 
Functions
FunctionsFunctions
Functions
PatriciaPabalan
 
Fda unit 1 lec 1
Fda unit 1 lec  1Fda unit 1 lec  1
Fda unit 1 lec 1
Eugin Britto
 
Functions
Functions Functions
Functions
Dr.Subha Krishna
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpu
Dhaval Jalalpara
 
Recursive Function
Recursive FunctionRecursive Function
Recursive Function
Harsh Pathak
 
Function in C and C++
Function in C and C++Function in C and C++
Function in C and C++
Rahul Sahu
 

What's hot (19)

Functions in C
Functions in CFunctions in C
Functions in C
 
Function in c language(defination and declaration)
Function in c language(defination and declaration)Function in c language(defination and declaration)
Function in c language(defination and declaration)
 
Functions in c
Functions in cFunctions in c
Functions in c
 
Lecture20 user definedfunctions.ppt
Lecture20 user definedfunctions.pptLecture20 user definedfunctions.ppt
Lecture20 user definedfunctions.ppt
 
Function in c program
Function in c programFunction in c program
Function in c program
 
Pre defined Functions in C
Pre defined Functions in CPre defined Functions in C
Pre defined Functions in C
 
Presentation on function
Presentation on functionPresentation on function
Presentation on function
 
User Defined Functions in C
User Defined Functions in CUser Defined Functions in C
User Defined Functions in C
 
Function in C
Function in CFunction in C
Function in C
 
Functions in c
Functions in cFunctions in c
Functions in c
 
User defined functions in C programmig
User defined functions in C programmigUser defined functions in C programmig
User defined functions in C programmig
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
Functions
FunctionsFunctions
Functions
 
Fda unit 1 lec 1
Fda unit 1 lec  1Fda unit 1 lec  1
Fda unit 1 lec 1
 
Functions
Functions Functions
Functions
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpu
 
Recursive Function
Recursive FunctionRecursive Function
Recursive Function
 
Function in C and C++
Function in C and C++Function in C and C++
Function in C and C++
 
Function in c
Function in cFunction in c
Function in c
 

Similar to Function

CH.4FUNCTIONS IN C_FYBSC(CS).pptx
CH.4FUNCTIONS IN C_FYBSC(CS).pptxCH.4FUNCTIONS IN C_FYBSC(CS).pptx
CH.4FUNCTIONS IN C_FYBSC(CS).pptx
SangeetaBorde3
 
Unit_5Functionspptx__2022_12_27_10_47_17 (1).pptx
Unit_5Functionspptx__2022_12_27_10_47_17 (1).pptxUnit_5Functionspptx__2022_12_27_10_47_17 (1).pptx
Unit_5Functionspptx__2022_12_27_10_47_17 (1).pptx
vekariyakashyap
 
Chapter 13.1.6
Chapter 13.1.6Chapter 13.1.6
Chapter 13.1.6patcha535
 
Lecture 11 - Functions
Lecture 11 - FunctionsLecture 11 - Functions
Lecture 11 - Functions
Md. Imran Hossain Showrov
 
Functionincprogram
FunctionincprogramFunctionincprogram
Functionincprogram
Sampath Kumar
 
Functions
FunctionsFunctions
Functions
Pragnavi Erva
 
VIT351 Software Development VI Unit1
VIT351 Software Development VI Unit1VIT351 Software Development VI Unit1
VIT351 Software Development VI Unit1
YOGESH SINGH
 
Functions in c
Functions in cFunctions in c
Functions in c
kalavathisugan
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
AFANJIPHILL
 
Function C programming
Function C programmingFunction C programming
Function C programming
Appili Vamsi Krishna
 
Functions assignment
Functions assignmentFunctions assignment
Functions assignment
Ahmad Kamal
 
unit3 part2 pcds function notes.pdf
unit3 part2 pcds function notes.pdfunit3 part2 pcds function notes.pdf
unit3 part2 pcds function notes.pdf
JAVVAJI VENKATA RAO
 
Functions-Computer programming
Functions-Computer programmingFunctions-Computer programming
Functions-Computer programming
nmahi96
 
C FUNCTIONS
C FUNCTIONSC FUNCTIONS
C FUNCTIONS
TeenaGeorge15
 
Unit-III.pptx
Unit-III.pptxUnit-III.pptx
Unit-III.pptx
Mehul Desai
 
04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx
Manas40552
 
User defined function in C.pptx
User defined function in C.pptxUser defined function in C.pptx
User defined function in C.pptx
Rhishav Poudyal
 

Similar to Function (20)

CH.4FUNCTIONS IN C_FYBSC(CS).pptx
CH.4FUNCTIONS IN C_FYBSC(CS).pptxCH.4FUNCTIONS IN C_FYBSC(CS).pptx
CH.4FUNCTIONS IN C_FYBSC(CS).pptx
 
Unit_5Functionspptx__2022_12_27_10_47_17 (1).pptx
Unit_5Functionspptx__2022_12_27_10_47_17 (1).pptxUnit_5Functionspptx__2022_12_27_10_47_17 (1).pptx
Unit_5Functionspptx__2022_12_27_10_47_17 (1).pptx
 
Chapter 13.1.6
Chapter 13.1.6Chapter 13.1.6
Chapter 13.1.6
 
Ch4 functions
Ch4 functionsCh4 functions
Ch4 functions
 
Lecture 11 - Functions
Lecture 11 - FunctionsLecture 11 - Functions
Lecture 11 - Functions
 
Functionincprogram
FunctionincprogramFunctionincprogram
Functionincprogram
 
Functions
FunctionsFunctions
Functions
 
VIT351 Software Development VI Unit1
VIT351 Software Development VI Unit1VIT351 Software Development VI Unit1
VIT351 Software Development VI Unit1
 
Functions in c
Functions in cFunctions in c
Functions in c
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Function C programming
Function C programmingFunction C programming
Function C programming
 
Fp201 unit5 1
Fp201 unit5 1Fp201 unit5 1
Fp201 unit5 1
 
Functions assignment
Functions assignmentFunctions assignment
Functions assignment
 
unit3 part2 pcds function notes.pdf
unit3 part2 pcds function notes.pdfunit3 part2 pcds function notes.pdf
unit3 part2 pcds function notes.pdf
 
Functions-Computer programming
Functions-Computer programmingFunctions-Computer programming
Functions-Computer programming
 
C FUNCTIONS
C FUNCTIONSC FUNCTIONS
C FUNCTIONS
 
Unit-III.pptx
Unit-III.pptxUnit-III.pptx
Unit-III.pptx
 
04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx
 
Function
FunctionFunction
Function
 
User defined function in C.pptx
User defined function in C.pptxUser defined function in C.pptx
User defined function in C.pptx
 

Recently uploaded

Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 

Recently uploaded (20)

Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 

Function

  • 2. Content  Introduction  Syntax  Program  Types of Functions  How the Function works?  Function Prototypes  Advantages of Function  Conclusion
  • 3. Introduction  Function is a name block of statement that are executed when it is called and performs a specific task.  C program contain at least one function which is main().  Basically a function is used to divide a large program of c in many subprogram.
  • 5. Example for Syntax For defining:- // function for finding maximum from two no. int max(int x, int y) { if(x>y) return(x); else return(y); }
  • 6. Cont.. For calling:- int main() { int x,y,m; x=10; y=5; // function calling to get max value m=max(x,y); printf(“max value = %d”,m); }
  • 7. Program int main() { int n,d; printf("enter a numbern"); scanf("%d",&n); d=fac(n); printf(“factorial = %d",d); } int fac(int n) { int f; for(f=1;n>=1;n--) f=f*n; return(f); }
  • 8. Types of Functions They are two types of function: 1. Pre define function (Library function) 2. User define function
  • 9. Pre define function (Library function) A function that has already be define in the library of ‘C’ language or library developed by other programmer is called Pre define function (Library function). Ex:- scanf, printf, puts, gets, etc.
  • 10. User define function A function define by the programmer itself that are called User define function and it can be n number of function.
  • 11. How the Function works?  “C” program doesn't execute the statement in function until the function is called.  When function is called the program can send the function information in the form of one or more argument.  When the function is used it is referred to as the called function.  Functions often use data that is passed to them from the calling function.
  • 12. Cont..  Data is passed from the calling function to a called function by specifying the variables in a argument list.  Argument list cannot be used to send data. Its only copy data/value/variable that pass from the calling function.  The called function then performs its operation using the copies and either it may be return some value or not.
  • 13. Function Prototypes  Provides the compiler with the description of functions that will be used later in the program  Its define the function before it been used/called  Function prototypes need to be written at the beginning of the program.  The function prototype must have : a return type indicating the variable that the function will be return  Syntax for Function Prototype return_type function_name(parameter _list);
  • 14. Advantages of Function  It is much easier to write a structured program where a large program can be divided into a functions.  Allowing the code to be called many times  Easier to read and update  It is easier to debug a structured program and easy to find and fix error.
  • 15. Conclusion Function is a name block of statement which is used to performs a specific task. A function is either call by value or by reference. They are two types of function pre define or user define. A function name is must be unique and it can be n no. of function which can be called n no. times means there is no limit. For using a function it is easy to write it, test it, and debug it.