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
You can do the whole static initializer thing as detailed above, but it can be a real bummer when your array size changes (when your array embiggens, if you don't add the appropriate extra initializers you get garbage).
memset gives you a runtime hit for doing the work, but no code size hit done right is immune to array size changes. I would use this solution in nearly all cases when the array was larger than, say, a few dozen elements.
If it was really important that the array was statically declared, I'd write a program to write the program for me and make it part of the build process.