int processIt(const char* command, char* paths[], int numberOfPaths) { /*paths contains the current path to be searched*/ for(i=0; i<numberOfPaths; i++) { char temp[1024]; strcpy(temp,paths[i]); strcat(temp,pathsep); strcat(temp,command); result = access(temp, X_OK); if(result != -1) { printf("%s\t",temp); printf("%d\n",result); } } return 0; } /* processIt! */