Question: #include // size_t for sizes and indexes ///////////////// WRITE YOUR FUNCTION BELOW THIS LINE /////////////////////// const char* myStrNCpy(char* dest, const char* src, int max) {

#include
while(src[max] != '\0') { dest[max] = src[max]; max++; } dest[max] = src[max]; return dest; }
///////////////// WRITE YOUR FUNCTION ABOVE THIS LINE /////////////////////// // These are OK after the function #include
void CHECK(char*, const char*, int, const string&);
void studentTests() { cout
CHECK((char*)"hello", "bob", 9, "hellobob"); CHECK((char*)"abc", "123", 4, "abc"); CHECK((char*)"abc", "123", 6, "abc12");
cout
int main() { studentTests(); } #include Hello, this is what I have done, but it seems to be wrong so please offer your own solution so I can see my errors. You can also make your own tests if needed and please done in C++.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
