FUNCTIONS

A FUNCTIONS IS A MODULE OR A SUB-MODULE OF A PROGRAM, IT AVOIDS REPEATATION OF CODES AND ALSO THE IMPRESSIBILITY OF THAT PROGRAM.


#include,stdio.h>
main()
{
printf("In Main");
pune();
printf("Back in Main");
}


pune()
{
printf("I am in Pune");
}




IN THE ABOVE PROGRAM THE FUNCTION MAIN() IS A CALLING FUNCTION AND THE FUNCTION PUNE() IS A CALLED FUNCTION.


WE CAN CALL ANY FUNCTION IN ANY SEQUENCE FROM ANY FUNCTION ANY NUMBER OF TIMES. A FUNCTION CAN EVEN CALL ITSELF, IF A FUNCTION CALL ITSELF IT IS KNOWN AS RECURRSION.

0 comments: (+add yours?)

Post a Comment