c++ zero array code example
Example 1: zeros of array c++
int A[5]; // Entries remain uninitialized
int B[5]= { 0 }; // All entries set to zero
Example 2: reset c array to zero
#define ZERO(a,n) do{\
size_t i_ = 0, n_ = (n);\
while (i_ < n_){\
(a)[i_] = 0;\
++i_;\
}\
} while (0)