title: C - repeated printf() with %s and char *
body: <pre><code>char * src_addr;
  char * dst_addr;
  
  src_addr = inet_ntoa(ip-&gt;ip_src);
  printf("src: %s\n", src_addr);
  
  dst_addr = inet_ntoa(ip-&gt;ip_dst);
  printf("dst: %s\n", dst_addr);
  
  printf("src: %s\n", src_addr);
  </code></pre>
  
  <p>This will output the dst_addr in the third printf statement. Am I doing something wrong?</p>