Problem with pointer

> the value of the array changed automatically, why?

Undefined behaviour.
What is the lifetime of the array arr in the function FillArray()?
Topic archived. No new replies allowed.