Microchip Technology SW006021-2 사용자 설명서
Library Functions
2012 Microchip Technology Inc.
DS52053B-page 347
Return Value
The function
memmove()
returns its first argument.
MEMSET
Synopsis
#include <string.h>
void * memset (void * s, int c, size_t n)
Description
The
memset()
function fills
n
bytes of memory starting at the location pointed to by
s
with the byte
c
.
Example
#include <string.h>
#include <stdio.h>
void
main (void)
{
char abuf[20];
strcpy(abuf, "This is a string";
memset(abuf, ’x’, 5);
printf("buf = ’%s’\n", abuf);
}
See Also
strncpy()
, strncmp(), strchr(), memcpy(), memchr()
MKTIME
Synopsis
#include <time.h>
time_t mktime (struct tm * tmptr)
Description
The
mktime()
function converts and returns the local calendar time referenced by the
tm structure
tmptr
into a time being the number of seconds passed since Jan 1, 1970,
or returns -1 if the time cannot be represented.