title: "aborted (core dumped)" in all programs
body: <p>yesterday, during programming time everything was okay, but today I get weird error. I do not know why but after running my programs, in terminal i get this error "aborted (core dumped)", also I run programs which are already done and the problem is the same. 
  Example of the program:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;ctype.h&gt;
  #define CHUNK 12
  
  char *getWord(FILE *infile);
  
  int main(int argc, char *argv[])
  {
      char *word;
      FILE *infile, *outfile;
      int n = 0;
  
      if(argc != 2) 
      {
          printf("Error! Type:./file_name input_file output_file\n");
          abort();
      }
  
      infile = fopen(argv[1], "r");
      if(infile != NULL)
      {
          outfile = fopen(argv[2], "w");
          if(outfile == NULL)
          {
              printf("Error! Cannot open the output_file\n");
              abort();
          }
          else
          {
              while(!feof(infile))
              {
                  word = getWord(infile);
                  if(word == NULL)
                  {
                      free(word);
                      abort();
                  }
  
                  n++;
                  if(n % 2 == 0)
                  {
                      fputs(word, outfile);
                      fputs(" ", outfile);
                  }
                  else 
                  {
                      fputs(word, outfile);
                      fputs("(", outfile);
                      fputs(word, outfile);
                      fputs(")", outfile);
                      fputs(" ", outfile);
                  }
                      free(word);
              }
          }
      }
      else
      {
          printf("Error! Cannot open the input_file\n");
          abort();
      }
  
      fclose(infile);
      fclose(outfile);
      return 0;
  }
  
  char *getWord(FILE *infile)
  {
      char *word, *word2;
      int length, cursor, c;
  
      word = malloc(sizeof(char)*CHUNK);
      if(word == NULL)
      {
          return NULL;
      }
  
      length = CHUNK;
      cursor = 0;
  
      while(isalpha(c = getc(infile)) &amp;&amp; !feof(infile))
      {
          word[cursor] = c;
          cursor++;
  
          if(cursor &gt;= length)
          {
              length += CHUNK;
              word2 = realloc(word, length*sizeof(char));
              if(word2 == NULL)
              {
                  free(word2);
                  return NULL;
              }
              else word2 = word;
          }
      }
  
      ungetc(c, infile);
      word[cursor] = '\0';
      return word;
  }
  </code></pre>
  
  <p>and the error: </p>
  
  <pre><code>Error! Type:./file_name input_file output_file
  Aborted (core dumped)
  </code></pre>