#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;fcntl.h&gt;&nbsp;   int main&#40;&#41;   &#123;       int fd;       char *buff;       buff = &#40;char *&#41;malloc&#40;sizeof&#40;char&#41;*5&#41;;       fd = open&#40;&quot;sanfoundry.txt&quot;,O_RDWR|O_CREAT&#41;;        write&#40;fd,&quot;Linux&quot;,5&#41;;       read&#40;fd,buff,5&#41;;       printf&#40;&quot;%s\n&quot;,buff&#41;;   &#125;
A. it will print nothing
B. it will print the string “Linux”
C. segmentation fault
D. none of the mentioned
Answer:A
#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;fcntl.h&gt;&nbsp;   int main&#40;&#41;   &#123;       int fd;       char *buff;       buff = &#40;char *&#41;malloc&#40;sizeof&#40;char&#41;*5&#41;;       fd = open&#40;&quot;sanfoundry.txt&quot;,O_RDWR|O_CREAT&#41;;        write&#40;fd,&quot;Linux&quot;,5&#41;;       read&#40;fd,buff,5&#41;;       printf&#40;&quot;%s\n&quot;,buff&#41;;   &#125;
A. it will print nothing B. it will print the string “Linux” C. segmentation fault D. none of the mentioned
Explanation:We have to use “lseek” system call if we want to read the file from the beginning just after writing into it.