How do I find out if the file is not present or the access rights are not present if the file pointer returns NULL in C? I am writing code in Linux. And the file has no access, but the file is present so how do I return different status that file was not present or file has no access.
Share
Check the value of
errnoafter the attempt to open the file: