結果 : function in cpp to find length of array