The only place you ever try to write to the file is in view_stud.
It looks like you are trying to rewrite the file to itself. Why?
Having the same file open for reading and writing is not good.
It also looks like you're trying to treat the file as both binary and plain text at the same time.
You may want to start over and get a simple example of writing and reading from a file working.
You ask for all the student info, but never do anything with it.
Your goto just creates an infinite loop, what's wrong with
Code:while(1) { all your code }