سورس نحوه عملكرد strncopy در سي پلاس براي دوست داران c++ اماده كردم كه اميد وارم مفيد باشه و استفاده كنيد.

include <iostream.h <
# include <cstring.h <
int main () }
char str[ ] = "cats are nice usually ". ;
cout<<"before operating :\n"<<str ;
strncpy(str,"dogs",4 (;
strncpy(str+9,"mean",4 (;
cout<<"\nafter operating :\n"<<str<<endl ;
return 0 ;
{
// e