If you use getc(), then you can check the variable and omit from your manipulation like this:

Code:
#include <stdio.h>

int main()
{
  char c;
  FILE *fp;

  fp = fopen("sample.txt","r");
  while((c = getc(fp)) != EOF)
    {
      if(c == ';' || c == '-' || c == '>')
        continue;
      else
        printf("%c", c);
    }

  fclose(fp);

  return 0;
}