Your program shows the contents of a file - not necessarily a student, if "student.txt" contained the contents of "Moby Dick", or perhaps was a copy of the C compiler, it would dump that to cout just as happily.
Since the assignment is to create two functions to read and display student information, I suspect what is expected is that you write one function to read student data into a data structure of some sort, and then another function to display some or all of the student information, so for example something like this
struct Student
{
};
Student readStudent(string filename)
{
}
void displayStudent(Student& student)
{
}
int main()
{
Student s = readStudent("student.txt");
displayStudent(s);
}