?
What is stored in logfile as per below mentioned code if we execute ./a.out > logfile?
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;
}
int main()
{
int fd;
close(1);
fd = open(“logfile”,O_RDWR, 0744);
write(fd, “Hello”, 5);
printf(“World\n”);
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login