Asking where the problem is not a question in C++.
You have to explain what the problem is, and then we will tell you where it is.
One problem in your code is this loop.
while (!infile.eof() && (count <=50))
{
infile>>names[count]>>scores[count];
count++;
sum+=scores[count];
}
For some reason that is usually in every C++ FAQ, do not use the .eof() function for end of file testing.
Change it to
while ((infile>>names[count]>>scores[count])&& (count <50))
{
sum+=scores[count];
count++;
}
That should correct the problem of incorrect calculation of the average.
For 2 and 3, you should use loops to iterate through all the values in the array, instead of just using scores[50].
Something like
for ( int i = 0 ; i < count; i++ )
{
if (scores[i ]<avrg)
cout<<names[i] << endl;
}