By using takes a memcpy() function. It takes a couple parameters:
memcpy, wmemcpy (CRT)
memcpy(destination, source, num_of_bytes);
ofcourse you may have to change the protection of memory in order to write to it. That's what VirtualProtect() is for. VirtualProtect Function (Windows)
and I think you should change back the protection once you change whatever address you wan, but Im not sure. =/