Program in C:
The strncpy(s1,s2,n) function copies exactly n characters froms2 to s1, truncating s2 or padding it with extra null characters asnecessary. The target string may not be null-terminated if thelength of s2 is n or more. The function returns s1. Write your ownversion of this function. Test the function in a complete programthat uses a loop to provide input values for feeding to thefunction.