Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179
Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
Материал из C\C++ эксперт
memcpy: copies count characters from *from into *to
//Declaration: void *memcpy(void *to, const void *from, size_t count);
//Return: returns *to.
#include <stdio.h>
#include <string.h>
#define SIZE 80
int main(void)
{
char buf1[SIZE], buf2[SIZE];
strcpy(buf1, "When, in the course of...");
memcpy(buf2, buf1, SIZE);
printf(buf2);
return 0;
}
/*
When, in the course of...*/