Displaying fields in wtmp file?

Anyone have any idea on how to display the fields for each record stored in the wtmp file using C? Am I correct in thinking that the info stored in wtmp is in binary and that utmpx will be of some help? Being a beginner, I can come up with bits and pieces of what I might need in order to do the task, but have a harder time putting all the pieces together to form working code. I am assuming I need to include these bits of code:

#include <utmp.h>
#include <utmpx.h>

struct utmpx record;
fread(&record, sizeof(record), ???)

printf(??????)

Any assistance would be greatly appreciated. Thanks.

Fantastic Driver!!! Thank you very much.