Header file: string.h
void *memcpy (void *dest, const void *SRC, size_t n);
Function: Copies n bytes from the beginning of the memory address referred to by the source SRC to the starting position of the memory address referred to by the target dest
void *memset (void *s, int ch, size_t n);
function: Replace n bytes (typedef unsigned int size_t) with the current position in s with ch and return S.
Memset: The function is to populate a block of memory with a given value, which is the fastest way to clear 0 operations on a larger struct or array
#include <iostream> #include <string.h>using namespace Std;int main () { int array_a[12] = { 23,45,6,7,4776,834,99954}; int array_b[12]; memset (Array_b,-1, sizeof (ARRAY_A)); Initializes the elements of array B to-1 memcpy (array_b, array_a+1, sizeof (int) *6); for (int i=0;i<12;i++) { printf ("%d", Array_b[i]); } return 0;}
C + + array processing related functions (memcpy/memset, etc.)