/Functions-in-C

A function is a block of code that performs a specific task, which makes a big complex problem to a small part of easy managed task.

Primary LanguageC

A function is a block of code that performs a specific task.

Suppose, you need to create a program to create a circle and color it. You can create two functions to solve this problem:

  1. create a circle function
  2. create a color function Dividing a complex problem into smaller chunks makes our program easy to understand and reuse.

There are two types of function in C programming:

  1. Standard library functions (scanf,printf etc.)
  2. User-defined functions (4 types) 2.1: No Argument Passed and No Return Value. 2.2: No Arguments Passed But Returns a Value. 2.3: Argument Passed But No Return Value. 2.4: Argument Passed and Returns a Value.