With fread, you read raw data from a file. That means that the string you read is not null-terminated. All the strxxx functions operate on null-terminated strings. Because str is not null-terminated, they treat the garbage after the real data as part of the string -- of undetermined length.
You should also pay attention to what WhozCraig said and make your str big enough, which also means to reserve one extra char for the terminating null character. It was a good idea to define a constant for the buffer size, but you should use it throughout your program consistently.
Anyway: null-terminate your string. fread returns the items successfully read, so:
char str[FREAD_SIZE];str[FREAD_SIZE + 1]; int n; /* ... */ n = fread(str, 1. FREAD_SIZE, ifp); if (n < 0) exit(1); str[n] = '\0'; Note that I have swapped the second and third arguments to fread. The second is the size of each item, here a char. The third is the maximum number of items to read. The return value will depend on that, because it returns the number of items read, not the number of bytes read.
Edit: The char buffer str must, of course, be big enough to hold ther terminating '\0'. Otherwise setting str[n] will write beyond the buffer if the maximum number of chars are read. (Thanks for WhozCraig for spotting that. Should really have though of that myself.)