Tuesday, November 1, 2011

C programming Functions & Pointers Summary

(a) To avoid repetition of code and bulky programs functionally related statements are isolated into a function.

(b) Function declaration specifies what is the return type of the function and the types of parameters it accepts.

 
(c) Function definition defines the body of the function.

(d) Variables declared in a function are not available to other functions in a program. So, there won’t be any clash even if we give same name to the variables declared in different functions.

(e) Pointers are variables which hold addresses of other variables.

(f) A function can be called either by value or by reference.

(g) Pointers can be used to make a function return more than one value simultaneously.

(h) Recursion is difficult to understand, but in some cases offer a better solution than loops.

(i) Adding too many functions and calling them frequently may slow down the program execution.

No comments:

Post a Comment