Is there a way to initialize an array of integers (or, possibly, any array), to a constant value other than zero (or null), which are the default values, without a for loop?
Ideally, I am looking for a function like "one" in Matlab, which is not only neat, but also more efficient.
source share