Question: int compare(char * S1 , char *S2, int n) { Using pointer notation only, write a function that accepts two arrays of characters (two strings)

int compare(char * S1 , char *S2, int n) {
Using pointer notation only, write a function that accepts two arrays of characters (two strings) Si and S2 as parameters. The function should compares the first n characters in the two strings and returns 1 if they are equals, otherwise 0 will be returned. (You may NOT use any of the string functions) Example : char sl [10] = ""this is a test"; char s2[10] = "this is an example"; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
