C question on functions
- by benjamin button
some times i see that functions are defined as below:
read_dir(dir)
char *dir;
{
DIR * dirp;
struct dirent *d;
/* open directory */
dirp = opendir(dir);
......... so on
here what is the importance of the statement
char *dir;
what is the intension behind declaring the pointer soon after the function name and then starting the function body.