Run Following Program Creating Files Foo Bar Happens Set One Two Time Values Utimes Functi Q26839231
Run the following program after creating the files foo and bar.What happens?
How can you set only one of the two time values with the utimesfunction?
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#define RWRWRW(S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
int main(int argc, char *argv[])
{
umask(0);
if (creat(“foo”, RWRWRW) < 0)
printf (“creat error for foo”);
umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (creat(“bar”, RWRWRW) < 0)
printf (“creat error for bar”);
exit(0);
}
The post Run Following Program Creating Files Foo Bar Happens Set One Two Time Values Utimes Functi Q26839231 appeared first on Nurses Den.
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”
The post Run Following Program Creating Files Foo Bar Happens Set One Two Time Values Utimes Functi Q26839231 appeared first on Save My Degree – SMD