title: c-string being saved to the end of another c-string
body: <p>I am making a program to store a library's book collection. One of the options is to add a new book to an array of structures. </p>
  
  <p><strong>Here is the code</strong></p>
  
  <pre><code>do
  {
      repeat = 0;
  
      cout &lt;&lt; "Enter the book's title: ";
      cin.getline(tempTitle, (TITLE_SIZE) * 2);
  
      for (int i = 0; i &lt; bookNumber; i++)
      {
          if (strcmp(tempTitle, bookArray[i].title) == 0)
          {
              cout &lt;&lt; "That title has already been entered, please enter a new book\n";
              repeat = 1;
          }
      }
  
      if (strlen(tempTitle) &lt; 1 || strlen(tempTitle) &gt; TITLE_SIZE)
      {
          cout &lt;&lt; "The Book's title must be between 1 and 50 characters long\n";
          repeat = 1;
      }
  
  } while (repeat == 1);
  
  strncpy(bookArray[bookNumber].title, tempTitle, TITLE_SIZE);
  file &lt;&lt; bookArray[bookNumber].title &lt;&lt; "\n";
  
  
  do
  {
      repeat = 0;
  
      cout &lt;&lt; "Enter the book's ISBN number: ";
      cin.getline(tempIsbn, (ISBN_SIZE) * 2);
  
      if (strlen(tempIsbn) != ISBN_SIZE)
      {
          cout &lt;&lt; "The Book's title must be 13 digits long\n";
          repeat = 1;
      }
  
  } while (repeat == 1);
  
  strncpy(bookArray[bookNumber].isbn, tempIsbn, ISBN_SIZE);
  </code></pre>
  
  <p><strong>Here is my input</strong></p>
  
  <pre><code>Enter the book's title: new book title
  Enter the book's ISBN number: 0000000000000
  Enter the book's author: Person
  Is the book currently in stock (y/n)? y
  </code></pre>
  
  <p><strong>Here is what it is saved as</strong></p>
  
  <pre><code>Title : new book title
  ISBN #: 0000000000000Person
  Author: Person
  Status: Available
  </code></pre>
  
  <p>Why is it saving the author c-string to the end of the isbn c-string?</p>