Puedes seguirnos en



Need of functions in programming

Functions are sub programs or set of instructions. In regular practice we use to write the program in the main() function. This is only a function in which we enclose the entire body of the program. Suppose programmer would like to do multiple calculations in the program which are of different type. The values out of one calculation may be used for further calculations.

In this case program becomes very large and complicated. Due to this complexity and large size of programs, the modification, maintained and even testing becomes difficult. Instead of writing all coding lines in the main() function itself we can divide our program in to sub parts called as functions.

The following video explains the need of functions:

Anuncio publicitario

Escrito por

Administrador de ENGGDRCAOS. Canal dedicado especialmente a la formación del estudiante que aspira a ser ingeniero. Todos los videos son Ingles. Apasionado del universo Apple, estudiante de Ingeniería y Gamer por vocación.




Function prototyping is one of the key improvements added to the C++ functions. When a function call is encountered, the compiler checks the function...


If we want two computers to communicate over a network, then the protocols on each layer of OSI model in the sending computer should...


In assembly language programs, small sequence of codes of the same pattern are repeated frequently at different places which perform the same operation on...


The concept at abstraction is commonly found in computer science. A big program is never written as a monolithic piece of program, instead it...