Is there an easier way in C to set an array to one value than using a for loop and going setting each value one by one?
C
for
You can set it to the same value, but only to 0
0
How to initialize all members of an array to the same value?
initialize all elements to 0:
int myArray[10] = { 0 }; // all elements 0
There is an answer in that page for gcc as well.