Is there a memset function?

Is there a function like memset in C/C++, or does for (..) { arr[i] = 12; } get optimized at compile time?
Was this page helpful?