aticleworld.com
How to Use strncpy() and how to write your own strncpy(). - Aticleworld
strncpy prevents from the buffer overflow because you put the length of bytes which you want to copy, but destination buffer should have sufficient space.
Amlendra