title: How to get an empty line in text file in c?
body: <p>I have a file which contains some data regarding anomalies. Each byte of data is written in a new line in a text file. Now to separate the data of different anomalies, I have added an empty line i.e. "\n" after the last byte of each data set. I am using the function:</p>
  
  <pre><code>while ((read = getline(&amp;line, &amp;len, fp)) != -1)
  {
       data[counter++] = (unsigned char)strtol(line,NULL,16);
       printf("The data received is %08x\n\r", data[counter - 1]);
  } 
  </code></pre>
  
  <p>So how do I detect if the line is the empty line?</p>