My Question :Code:char* new_strcpy(char* destination,const char* source)
{
int i=0;
while(*(source+i)!='\0')
{
*(destination+i)= *(source+i);
i++;
}
*(destination+i)='\0';//line
return destination;
}
char* new_strncpy(char* destination,const char* source,size_t n)
{
int i=0;
while(i!=n)
{
*(destination+i)= *(source+i);
i++;
}
*(destination+i)='\0';//line
return destination;
}
If we are trying to copy from source to a destination with my while condition would a '\0' be copied to destination? or would I need the (comment marked line)separately.