Explain types of function with suitable example.
Answers
Answered by
0
Functions are used for Placing or Storing the Code which is to be Repeated Several Times. For Example, if we need Same Code, then we must have to Write that Code Again and Again So that for Removing this Task, we uses functions.
There are Two Types of Functions
1) Built in Functions
2) User Defined functions
The Functions those are provided by C Language are refers to the Built in Functions For example. cin and cout, getch , Clrscr are the Examples of Built in Functions. So that all the functions those are provided by the C++ Language are Pre defined and Stored in the Form of header Files so that a user doesn’t need to Know how this Function has developed and a user just use that Function.
But in the other hand the Functions those are developed by the user for their Programs are known as User Defined Programs. When a user wants to make his Own Function, then he must have to follow the Following Operations.
1) Function Declaration or Prototyping
2) Function Defining
3) Calling a Function
There are Two Types of Functions
1) Built in Functions
2) User Defined functions
The Functions those are provided by C Language are refers to the Built in Functions For example. cin and cout, getch , Clrscr are the Examples of Built in Functions. So that all the functions those are provided by the C++ Language are Pre defined and Stored in the Form of header Files so that a user doesn’t need to Know how this Function has developed and a user just use that Function.
But in the other hand the Functions those are developed by the user for their Programs are known as User Defined Programs. When a user wants to make his Own Function, then he must have to follow the Following Operations.
1) Function Declaration or Prototyping
2) Function Defining
3) Calling a Function
Similar questions