Why we use function in C?

Functions are used for dividing a large code into module, due to this we can easily debug and maintain the code. For example if we write a calculator programs at that time we can write every logic in a separate function. Any function can be called many times.

Advantages of Function
  • Code Reusuability
  • Develop an application in module format
  • Easy to debug the program
  • Code optimization: no need to write a lot of code
  • Code is easier to read
  • Program testing becomes easier
  • Compiled executable is smaller
  • You don't need to make comments because function name make sense
  • Program can be developed in short period of time
  • There is no chance of code duplication

Comments

Post a Comment

If you have any doubt, let me know...

Popular posts from this blog

Unacceptable Individual Drives Twitter

ChatGPT on smartwatches

Program to find greatest number among any three different numbers inputted by User.