title: What is the purpose of buffer = "\0"
body: <p>I remember reading the explanation on the use of this line of code, but I've read so many books on sockets for the past week that I can't find it anymore. </p>
  
  <p>I do remember in the book, they wrote their code using =\0, then said it would be better to have it at 1</p>
  
  <p>I tried searching it, but had no luck, this is a piece of the code I'm reading where it is used</p>
  
  <pre><code> nread = recv(newsock, buffer, 25, 0);
   buffer[nread] = '\0';
  </code></pre>