 <p>The error says it all: fgets() expects three arguments. You are giving it one. </p> <p>So, call it like this:</p> <pre><code>fgets(buffer, 256, stdin) </code></pre> <p><em>buffer</em> is where the input is to be stored, <em>256</em> is the size of the buffer, <em>stdin</em> is the stream to read from. </p> <p>Also, <a href="http://stackoverflow.com/questions/3209909/how-to-printf-unsigned-long-in-c">use %lu</a> instead of %d as the format specifier for unsigned long. </p> <p><strong>Edit</strong>: <a href="http://stackoverflow.com/questions/2524611/how-can-one-print-a-size-t-variable-portably-using-the-printf-family">Use the z modifier</a> as <code>%zu</code> for the value returned by <code>strlen</code>, which is of type <code>size_t</code></p>