Why should a function that accepts an array as an argument and processes that array also accept an argument specifying the array?

1 answer

Answer

1026467

2026-07-28 02:35

+ Follow

Basically in c++ passing an array as an argument only provides a pointer to the first value and that function won't know how many values it has.

If you read beyond the size you will just get garbage from memory.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.