title: Process exited prematurely with a SIGSEGV signal
body: <p>This code shows this SIGSEGV error, which I understand, is a segmentation error. Can someone please help!
  The code <strong>returns the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than once in the input string.</strong>
  I am using this on a programming challenge so this is only a function.</p>
  
  <p>So, If I input "aabcdef" it should return 2 because 'a' occurs twice. Input can contain alphabets as well as numerics.</p>
  
  <pre><code>int duplicateCount(const char* in)
  {
  int a[39]={0},b=0;
  for(int i=0;i&lt;strlen(in);i++)
  {
      if(in == NULL)
          return 0;
  
  
      if((int)in[i] &lt; 97)
      {
          a[(int)in[i]]++;
      }
      a[tolower(in[i])-'a'+1]++;
  }
  
  for(int i=0;i&lt;39;i++)
  {
      if(a[i]&gt;1)
  
          b++;
  }
  
  
  return b;
  
  }
  </code></pre>