Replaced arr + countof ( arr ) with end( arr ).