memset memcopy

来源:互联网 发布:php全局变量作用域 编辑:程序博客网 时间:2024/06/06 01:41

void *memset( void *dest, int c, size_t count );

 

需要的头文件

<memory.h> or <string.h>

 

 

example:

 

#include <memory.h>
#include <stdio.h>

int main( void )
{
   char buffer[] = "This is a test of the memset function";

   printf( "Before: %s/n", buffer );
   memset( buffer, '*', 4 );
   printf( "After:  %s/n", buffer );
}

 

memcopy

原创粉丝点击