title: message queue in C: implementing 2 way comm
body: <p>I am a student and a begineer in C. I want to implement 2 way communication using message queue in C linux. Do I need two queues or only one to get this done?</p>
  
  <p>Also I would like to know can I send data(shown in code) to another process or i need to declare it as a character array.</p>
  
  <pre><code>typedef struct msg1
  {
      int mlen;
      char *data;
  }M1;
  
  typedef struct msgbuf
  {
      long    mtype;
      M1      *m;
  } message_buf;
  </code></pre>
  
  <p>Thanks in advance :) </p>