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

What is stored in logfile as per below mentioned code if we execute ./a.out > logfile?
int main() 
{
    int fd;
    close(1);
    fd = open(“logfile”,O_RDWR, 0744);
    write(fd, “Hello”, 5);
    printf(“World\n”);
    return 0;
}

Answer & Solution
Correct Answer: Option B
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.