title: allocating memory for sprintf problem?
body: <p>the problem is i dunno how long the string will be, so i dunno how much should i allocate for my data...</p>
  
  <pre><code>char *Data = malloc(1024*1024);  //???????
  sprintf(Data, "%s %s", Data1, Data2);
  </code></pre>
  
  <p>Data1 and Data2 varies in Size from time to time.... from very very long to very small
  i was wondering if there is away to use sprintf without allocating memory or something, since the allocated memory could be small sometime..</p>
  
  <p>thanks</p>