Changing and controlling code flow in C