Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.

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
Share:

1 comment:

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

Translate

Wikipedia

Search results