title: Code for Longest Common Subsequence is not showing result properly
body: <p>I am working for a program that solves the problem of finding the maximum length of Longest common subsequence in given two strings, I've observed it doesn't show me the first character of my 2 strings in the resultant matrix.<br></p>
  
  <p>Example - Two strings are<br></p>
  
  <ul>
  <li>BDCABA<br> </li>
  <li>ABCBDAB<br></li>
  </ul>
  
  <p>Result - <br></p>
  
  <p><img src="https://i.stack.imgur.com/e6aej.jpg" alt="Result"></p>
  
  <hr>
  
  <blockquote>
    <p>There is no fault in the Algorithm, but probably there may be some
    glitches in my C code.</p>
  </blockquote>
  
  <p>Code -
  <br></p>
  
  <pre><code> #include&lt;stdio.h&gt; 
      #include&lt;string.h&gt; 
      #define size 20 
      char A[size],B[size]; 
      int i,j,A_len,B_len;
      int score[size][size];
      void main() 
      { 
          printf("\tEnter first string\n\t");
          scanf("%s",A);
          printf("\tEnter second string\n\t");
          scanf("%s",B);
          printf("\n");
          A_len = strlen(A); 
          B_len = strlen(B); 
          A[0] = ' ';
          printf("\t      ");
          for(i=1;i&lt;=B_len;i++) 
              printf("%5c",toupper(B[i]));
          printf("\n\n");
          for(i=0;i&lt;=A_len;i++) 
          { 
              for(j=0;j&lt;=B_len;j++) 
              { 
                  if(i==0 || j==0) 
                      score[i][j]=0; 
                  else if(A[i] == B[j] ) 
                      score[i][j] = score[i-1][j-1] + 1; 
                  else 
                  {
                      if(score[i][j-1]&gt;score[i-1][j])
                          score[i][j] = score[i][j-1];
                      else
                          score[i][j] = score[i-1][j];
                  }
              } 
          }
          for(i=0;i&lt;=A_len;i++)
          {
              printf("\t%c",toupper(A[i]));
              for(j=0;j&lt;=B_len;j++)
                  printf("%5d",score[i][j]);
              printf("\n\n"); 
          }
          if(score[A_len][B_len] != 0)
          {
              printf("Longest common subsequence is of %d length :\t",score[A_len][B_len]);
          }
          else
              printf("longest common subsequence not found");
      }
  </code></pre>
  
  <p>The code is <strong>returning correct result</strong> for all strings, but it is not showing input string names in result as they are provided, it skips the first character of both strings, and unfortunately I am getting no reason for this behavior, please help me to resolve this problem.
  <br>
  Thanks</p>