早教吧 育儿知识 作业答案 考试题库 百科 知识分享

Linux+Programming+by+Example第四章第7题Writeasimpleversionoftheumaskprogram,namedmyumask,thattakesanoctalmaskonthecommandline.Usestrtol()withabaseof8toconvertthecharacterstringcommand-lineargumentintoanintegerv

题目详情
Linux+Programming+by+Example 第四章 第7题
Write a simple version of the umask program,named myumask,that takes an octal mask on the command line.Use strtol() with a base of 8 to convert the character string command-line argument into an integer value.Change the umask to the new mask with the umask() system call.
Compile and run myumask,and then examine the value of the umask with the regular umask command.
Explain the results.(Hint:in Bash,enter 'type umask'.)
望高人给出完整的,可执行的代码.
▼优质解答
答案和解析
找计算机学院的问下