Welcome

C Programming Tutorial


C Functions

In C all executable code contained with in the function. Breaking the whole task into subtaks. or Decompose the whole task into smaller tasks, each function is associted with task. C follows Top-Down Approrach. Functions are defined as individual objects that cannot be nested. C Programs begins with function called main,which can call other functions and libray functions such as printf and sqrt etc., Function Operate with Program variables.

Benefits Of Functions

  • Functions allow a program to be split set of subproblems,which in turn may be further split into smaller subproblems. This divide-and-Conquer approach means that small parts of the program can be written,tested and debugged in isolation without interfering with other parts of the program.
  • Functions can wrap difficult algorithms into simple and intuitve interface
  • Functions avoid code duplication. If a perticular segment of code is required in several places, a function provides tidy means for writing the code only once. This is of considerable benefit,if the code segment is later altered.

ADS