Wednesday 13 February 2013

What is Functions in C Programming Language ?



Functions are the building blocks of C. All programs definitely consist of one function - main() - and inevitably refer to, or, in programming terminology, call or invoke standard functions of C such as printf(), scanf(), etc. as well as user-defined functions.

Advantages of Functions

Besides the obvious advantages of

-> Reusability, and
-> Structing of programs

functions also provide programmers a convenient way of designing programs in which complex computations can be built into the functions. Once properly designed, a programmer does not have to bother about how the calculations are done in the function; it is sufficient for him to know what it does. Thus, to the programmer, the function itself would be like a black box. The programmer has to the function.

The use of functions would probably save a programmer the often nerve-racking experience of debugging a program that refuses to 'function' properly.

0 comments:

Post a Comment

Powered by Blogger.