Passing char arrays to a function - best practice