Assignment 5 Pointer-based pass-by-reference usage Solution