-

Changes

Jump to: navigation, search

Functions HI-TECH C MEMSET

1,395 bytes added, 22:28, 31 July 2017
Created page with "<strong>MEMSET, MEMCPY, MEMCMP, MEMMOVE</strong> ==SYNOPSIS== #include <string.h> void memset(void s, char c, size_t n) void * memcpy(void * d, void * s, size_t..."
<strong>MEMSET, MEMCPY, MEMCMP, MEMMOVE</strong>
==SYNOPSIS==

#include <string.h>

void memset(void s, char c, size_t n)
void * memcpy(void * d, void * s, size_t n)
int memcmp(void * s1, void * s2, size_t n)
void * memmove(void * s1, void * s2, size_t n)
void * memchr(void * s, int c, size_t n)


==DESCRIPTION==
<strong>Memset</strong>() initializes n bytes of memory starting at the
location pointed to by s with the character c. <strong>Memcpy</strong>()
copies n bytes of memory starting from the location
pointed to by s to the block of memory pointed to by d.
The result of copying overlapping blocks is undefined.
<strong>Memcmp</strong>() compares two blocks of memory, of length n,
and returns a signed value similar to <strong>strncmp</strong>(). Unlike
<strong>strncmp</strong>() the comparision does not stop on a null character. The ascii collating sequence is used for the
comparision, but the effect of including non-ascii
characters in the memory blocks on the sense of the
return value is indeterminate. <strong>Memmove</strong>() is similar to
<strong>memcpy</strong>() except copying of overlapping blocks is handled correctly. The <strong>memchr</strong>() function locates the first
occurence of c (converted to unsigned char) in the initial n characters of the object pointed to by s.

==SEE ALSO==

strncpy, strncmp, strchr

Navigation menu