Check out example codes for "reset c array to zero". It will help you in understanding the concepts better.

Code Example 1

#define ZERO(a,n) do{\ 	size_t i_ = 0, n_ = (n);\ 	while (i_ < n_){\ 		(a)[i_] = 0;\ 		++i_;\ 	}\ } while (0)

Learn ReactJs, React Native from akashmittal.com