If you're setting the array to all 0's, or if the array is an array of bytes, you can use memset
// Set myArray to all 0's
memset(myArray, 0, numberOfElementsInMyArray * sizeof(myArray[0]));
If you need to set it to something other than 0 in units larger than a byte (e.g. set an array of int
s to 1's), then there is no standard function to do that -- you'll have to write your own for loop for that.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…