title: strlen of a char array is greater than its size. How to avoid?
body: <p>I defined an array:</p>
  
  <p>char arr[1480];</p>
  
  <p>Now, from a file, I read exactly 1480 chars and put into arr (by doing arr[i]=c).
  I know 1480 chars because I use a while loop to read one char ar a time (istream.get()) and stop when the incrementing index = 1480.</p>
  
  <p>However, after that, I do strlen(array) and it returns 1512. How come? This only happens in some occasions, but not in all occasions, even though every time I read from file, I always read up to 1480 chars.</p>
  
  <p>My doubt is one char might occupy more than 1 unit (units returned by strlen(arr)). 
  If so, how can I fix this?</p>
  
  <p>Thanks</p>
  
  <p>PS: I asked a problem earlier about my pointer gets garbaged, and this is the cause when I have a buffer (arr) of length > 1480. </p>