I’m programming in C and wonder if it’s possible to assign multiple values at once to a multi-dimensional array?
I have tried some technique but all have failed!
I’m NOT interested to loop through the array to assign values (I want the fasted way to assign new values to all index in the array).
The array I’m working with: ary[4][4].
I’m programming in C and wonder if it’s possible to assign multiple values at
Share
Since an array is not a modifiable lvalue, it cannot appear on the left side of an assignment. You can initialize it and you can assign individual members via indexing.
And a modifiable
lvalue:So no, you can’t do what you want.