Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren+ 1
What is memcpy() in c?
1 Antwort
+ 9
It makes a memory copy. It has no problem overwriting everything, if used wrong.
struct t {int a, b;} org = {6, 7}, cpy;
memcpy(&cpy, &org, sizeof(struct t));
cpy.a now has 6 and cpy.b has 7.