Logo

Programming-Idioms

Set all the elements of the byte array a to zero
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
clear(a[:])
clear(a)
import java.util.Arrays;
Arrays.fill(a, (byte)0);
FillByte(a, Length(a), 0);
import numpy
a = numpy.ones((n,), numpy.uint8)
a.fill(0)
a.fill(0);