Function in C programing

A large C program is divided into basic building blocks called C Function. C function contains set of instructions enclosed by "{ }" which performs specific operation in a C program. Actually, collection of these functions creates a C program.

C functions are basic building blocks in a program.

  • A large program in c can be divided to many subprogram
  • The subprogram posses a self contain components and have well defined purpose
  • The subprogram is called as a function
  • Basically a job of function is to do something
  • C program contain at least one function which is main()

Types of C functions

  1. User defined function: main()
  2. Library Function: printf(), scanf(), sqrt() etc.