Computer Science, asked by Arookumar6142, 11 months ago

Define functions with example.

Answers

Answered by devrajdeora1998
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 laraibmukhtar55
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