print_arr() and function order