Factor code into function print_names_ages_pointer_args()