Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What types of arrays can be cleared by memset function in C language?
What types of arrays can be cleared by memset function in C language?
Any type of array can be used. In fact, the memset function is just a series of spaces after an address is assigned. Any address value can be assigned. \x0d\ 1, memset is a C/C++ language function in the computer. Set all the contents of the first n bytes in the memory pointed by S to the ASCII value specified by ch, the second value to the specified memory address, and the block size specified by the third parameter. This function usually initializes the memory of a new application, and its return value is a pointer to S. Function introduction: void * memset (void * s, int ch, size _ t n); \x0d\ function explanation: replace the first n bytes (typedef unsigned int size_t) in s with ch and return s, \x0d\memset: used to fill a given value in a memory block, which is the fastest way to clear a large structure or array.