The thing about memset(), memcpy() & memove()

Came across these two pieces of advice regarding the use of these library functions in C:
  • DO use memmove() instead of memcpy() in case you're dealing with overlapping memory regions.
  • DON'T try to use memset() to initialize type int, float, or double arrays to any value other than 0.
More details hereIf you are an embedded C programmer, its worth a read.


Comments

Popular posts from this blog

Replacing the current sense resistor in Portable Chargers/Power Banks for powering low power DIY projects.

Interface USB Mouse to your Arduino using CH375B

Simple TCP client server sockets application using IPv6 and IPv6