Creating multiple threads in C
<p>I am just a beginner in Programming using C.For my college project I want to create a multi-threaded server application to which multiple clients can connect and transfer there data which can be saved in a database.</p>

<p>After going through many tutorials I got confused about how to create multiple threads using pthread_create.</p>

<p>Somewhere it was done like:</p>

<pre><code>pthread_t thr;

pthread_create( &amp;thr, NULL ,  connection_handler , (void*)&amp;conn_desc);
</code></pre>

<p>and somewhere it was like</p>

<pre><code> pthread_t thr[10];

 pthread_create( thr[i++], NULL ,  connection_handler , (void*)&amp;conn_desc);
</code></pre>

<p>I tried by implementing both in my application and seems to be working fine. Which approach of the above two is correct which I should follow.
sorry for bad english and description.</p>