SIGXFSZ on ideone.com?
<p>I want to print repeated characters in a string in ascending order. This code compiles but gives a <code>SIGXFSZ</code> runtime error with no output on online c++ compilers... any suggestions?</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string.h&gt;
#include &lt;ctype.h&gt;

using namespace std;

int main()
{
  unsigned int i;
  char str[26];
  int a[26];
  for(i=0;i&lt;26;i++)
    a[i]=0;
A:
  i=0;
  cout&lt;&lt;"Enter the string:";
  cin&gt;&gt;str[i];

  while(str[i]!=13)
  {
    if(isalpha(str[i]))
      i++;
    else{
      cout&lt;&lt;"Invalid string";
      goto A;
    }
  }

  cout&lt;&lt;"You Enterd:"&lt;&lt;str;

  for(i=0;i&lt;strlen(str);i++)
    ++a[str[i]-97];

  cout&lt;&lt;"\nLetters Frequency:";

  for(i=0;i&lt;26;i++)
    cout&lt;&lt;a[i]&lt;&lt;" ";

  cout&lt;&lt;"\nDuplicates in sorted order:";

  for(i=0;i&lt;26;i++)
  {
    if(a[i]&gt;1)
      cout&lt;&lt;char(i+97);
  }

  return 0;
}
</code></pre>
