title: How to write API program
body: <p>I like to know how to write a program which would export some API function.</p>
  
  <p>For ex: Suppose I have few function, lets take add(int x,int y), mul(int x,int y) sub(int x, int y).</p>
  
  <p>How can I write a daemon in c such that this will export above API to external world.</p>
  
  <p>And how can I access these APIs from other program?</p>
  
  <p>I am expecting from code point of view... Thanks in advance...</p>