 <p>An IP address ist just the individual octets printed as decimal separated by a . </p> <pre><code> printf("%d.%d.%d.%d",address[0],address[1],address[2],address[3]); </code></pre> <p>You probably should make your <code>char address[4]</code> an <code>unsigned char address[4]</code></p>