title: How to find a free TCP Port in windows using 'C'
body: <p>I would like to have two windows applications which communicate over TCP/IP using windows sockets. In this, I want my program to automatically choose the available free port for connection establishment.</p>
  
  <p>Is there a way to find the free TCP port using a C or C++ program?</p>
  
  <p>To be precise, I'd like to automatically detect a free port on the Server side and let the client know the same port(to connect to server). </p>
  
  <p>Thanks for your time!</p>