I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.
I could swear I
If the array happens to be int or anything with the size of int or your mem-pattern's size fits exact times into an int (i.e. all zeroes or 0xA5A5A5A5), the best way is to use memset().
Otherwise call memcpy() in a loop moving the index.