>let me know if this is gonna work
No. You can't portably do this in C because of the padding rules for data types (and structures in the case of your example). Tell your teacher that sizeof is there to provide a portable solution to a problem that is otherwise not possible. There's no reason not to use it, and as an assignment this doesn't teach you anything except silly tricks that are subtly broken.