hi,
could anyone pls help...
for strcpy - the definition says that it copies the nul character as well
but how about strncpy..
i.e.
char *s="hello world";
strncpy(tmp,s,5);
would hello be copied or would hell be copied and nul is inserted at the end...
i ask this because , i get memory problems..i think because of this...
tmp is dynamically allocated. thansk
Start Free Trial