Define functions with example.
Answers
Answered by
1
Answer:
A function is a block of code that performs a specific task. C allows you to define functions according to your need. These functions are known as user-defined functions.
For example: Suppose, you need to create a circle and color it depending upon the radius and color.
Answered by
2
Function:
- A function is a block of prearranged, reusable code that is applied to perform a single, interrelated action.
- Functions provide improved modularity for one’s application and a great degree of code reusing.
Example:
Functions like printf() and main() are named built-in functions delivered by the language itself, but one can write his/her own functions as well.
Hope it helped..
Similar questions
English,
5 months ago
Math,
5 months ago
Computer Science,
11 months ago
Computer Science,
11 months ago
CBSE BOARD X,
1 year ago
Economy,
1 year ago