title: Convert float data to Char data that has to be sent over UDP
body: <p>I'm using C socket to send data to a Server, I found some example on internet but all of them show a char data sent over the network. 
  Instead, my data are float, so I need to convert these data from float to a char to send it, and on the Server side I must convert it back to float.</p>
  
  <p>I read about sprintf or snprintf, but I found some problems with using these functions.</p>
  
  <p>My situation:</p>
  
  <p>packet[4] = {112.3, 113.4, 234.8, 599.4} "For example"</p>
  
  <p>I need to send it as char to the Server.</p>
  
  <p>Thanks in advance</p>