A function is a self contained program segment that carries out some specific, well defined task.Every C program consists of one or more functions.One of these functions must be called main.Execution of the program will always begin by carrying out the instructions in main.Additional functions will be subordinate to main, and perhaps to one another.
If a program contains multiple functions,their definitions may appear in any order,though they must be independent of one another.That is,one function definition cannot be embedded within another.
A function will carry out its intended action whenever it is accessed (i.e. whenever the function is "called") from some other portion of the program.The same function can be accessed from several different places within a program.Once the function has carried out its intended action,control will be returned to the point from which the function was accessed.
Tuesday, December 15, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment