title: sending string in client-server programming in C language
body: <p>I'm currently doing socket programming. Now, bytes can be easily sent and received between client-server.
  Now, I want to send string between client server.</p>
  
  <p>The code which I've used for the same is(Client):  </p>
  
  <pre><code>    strcpy(recvbuf, sendbuf);
      send(ConnectSocket, recvbuf, strlen(recvbuf), 0);
      printf("\nSending string...");   
  </code></pre>
  
  <p>(Server)</p>
  
  <pre><code>    iResult = recv(ClientSocket, recvbuf, sizeof(recvbuf) -1, 0);
      recvbuf[iResult]= '\0';
      strcpy(sendbuf2, recvbuf);
      printf("String recieved = %s", sendbuf2);
  </code></pre>
  
  <p>But, it is not showing the correct result.
  Is there any link which can help me?</p>