Write a function called my_str_n_cat () that accepts pointer to a destination ch
ID: 3681152 • Letter: W
Question
Write a function called my_str_n_cat () that accepts pointer to a destination character array and a pointer to a source character array (which is assumed to be a string) and returns the pointer to the destination character array. This function needs to copy at most n characters, character by character, from the source character array to the END of the destination character array. If a null character is encountered before n characters have been encountered, copying must stop. You may NOT use any functions found in to solve this problem! Note: you may use array or pointer notation in this function.Explanation / Answer
char *p = a,*b;
cout << " Enter array: " ;
cin >> p;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.