#include&lt;stdio.h&gt;   #include&lt;fcntl.h&gt;&nbsp;   int main&#40;&#41;   &#123;       int fd, count;       fd = open&#40;&quot;sanfoundry.txt&quot;,O_WRONLY|O_CREAT&#41;;       count = write&#40;fd,&quot;Linux System Programming&quot;,5&#41;;       if&#40;count != 5&#41;           perror&#40;&quot;write&quot;&#41;;       return 0;   &#125;
A. it will create a file “sanfoundry.txt” in the present working directory
B. it will write the string “Linux System Programming” in the file “sanfoundry.txt”
C. both (a) and (b)
D. none of the mentioned
Answer:A
#include&lt;stdio.h&gt;   #include&lt;fcntl.h&gt;&nbsp;   int main&#40;&#41;   &#123;       int fd, count;       fd = open&#40;&quot;sanfoundry.txt&quot;,O_WRONLY|O_CREAT&#41;;       count = write&#40;fd,&quot;Linux System Programming&quot;,5&#41;;       if&#40;count != 5&#41;           perror&#40;&quot;write&quot;&#41;;       return 0;   &#125;
A. it will create a file “sanfoundry.txt” in the present working directory B. it will write the string “Linux System Programming” in the file “sanfoundry.txt” C. both (a) and (b) D. none of the mentioned
Explanation:This program will write only “Linux” in the file “sanfoundry.txt” because we are writing only 5 bytes with “write” system call.