What is the different between a function that uses static variables and a static function? I know that a function that has static variables more or less keeps a 'running' total of the variable(s) inside it. What I am confused on is what a static function is meant to do. Is this a static function prototype?
Or is a function just called static becase it uses static variables? If they are two different things could some one point me in the direction of where I could see some examples? Also, is there a purpose to use a static variable if main() is the only function in the program?Code:static int add(int, int);