Moving from Qbasic to C