while ((pDirent = readdir(pDir)) != NULL) { printf("*******"); printf("The filePath … Suggestion: posting all the relevant portions of the code will help you get …