Are you in the same class as return0?: http://cboard.cprogramming.com/c-programming/154225-c-program.html

What have you done yet?

For reading files you could start with reading about basic I/O...