Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote