ExamVeda
Login
Home
This question belongs to Computer Science Linux
Linux
?

Given a code snippet below?
#define PERMS  (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
int main() 
{
    int fd1, fd2;
    umask(0);
    fd1 = open(“file1”, O_CREAT | O_RDWR, PERMS)
    umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
    fd2 = open(“file2”, O_CREAT | O_RDWR, PERMS)
    return 0;
}
The newly created files file1 and file2 will have the permissions respectively

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.