#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;string.h&gt;   #include&lt;sys/types.h&gt;   #include&lt;sys/ipc.h&gt;   #include&lt;sys/msg.h&gt;&nbsp;   struct data_st&#123;       long int id;       char buff&#91;11&#93;;   &#125;;   int main&#40;&#41;   &#123;       int m_id,ret;       struct data_st data1, data2;       m_id = msgget&#40;&#40;key_t&#41;181,0666|IPC_CREAT&#41;;       if&#40;m_id == -1&#41;           perror&#40;&quot;msgget&quot;&#41;;       data1.id = 1;       strcpy&#40;data1.buff,&quot;Sanfoundry&quot;&#41;;       ret = msgsnd&#40;m_id,&amp;data1,11,0&#41;;       printf&#40;&quot;%d\n&quot;,ret&#41;;       if&#40;msgrcv&#40;m_id,&amp;data2,11,1,0&#41; == -1&#41;           perror&#40;&quot;msgrcv&quot;&#41;;       if&#40;msgctl&#40;m_id,IPC_RMID,0&#41; != 0&#41;           perror&#40;&quot;msgctl&quot;&#41;;       return 0;   &#125;
A. 0
B. 1
C. -1
D. none of the mentioned
Answer:A
#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;string.h&gt;   #include&lt;sys/types.h&gt;   #include&lt;sys/ipc.h&gt;   #include&lt;sys/msg.h&gt;&nbsp;   struct data_st&#123;       long int id;       char buff&#91;11&#93;;   &#125;;   int main&#40;&#41;   &#123;       int m_id,ret;       struct data_st data1, data2;       m_id = msgget&#40;&#40;key_t&#41;181,0666|IPC_CREAT&#41;;       if&#40;m_id == -1&#41;           perror&#40;&quot;msgget&quot;&#41;;       data1.id = 1;       strcpy&#40;data1.buff,&quot;Sanfoundry&quot;&#41;;       ret = msgsnd&#40;m_id,&amp;data1,11,0&#41;;       printf&#40;&quot;%d\n&quot;,ret&#41;;       if&#40;msgrcv&#40;m_id,&amp;data2,11,1,0&#41; == -1&#41;           perror&#40;&quot;msgrcv&quot;&#41;;       if&#40;msgctl&#40;m_id,IPC_RMID,0&#41; != 0&#41;           perror&#40;&quot;msgctl&quot;&#41;;       return 0;   &#125;
A. 0 B. 1 C. -1 D. none of the mentioned
Explanation:The function msgsnd() returns 0 when there is no error.