H Lecture 8: FUNCTIONS
Document Summary
Functions functions are subprograms which are used to compute a value . they cannot be run independently and are always called by the main() function or by some other function. there are two kinds of function: library or built-in functions, user defined functions. Calling a function: a function is called by the calling program using the function name with the required number of arguments . Actual and formal arguments the arguments listed in function calling statement are actual arguments the arguments used in declaration are formal arguments. Function prototype informs the compiler that there will be a function defined later that: like int hi(int); When a function is called by the calling program, the values to the arguments in the function are supplied by the calling program. The values supplied can be used inside the function. Any alteration to the value inside the function is not accepted in the calling program but the change is locally available in the function.