I have an assignment in C where I need to create a function to compare 2 strings to see if they are equal without using any of the standard library functions for strings. I have the following so far.
How would I create the equals function?Code:#include <stdio.h> #include <stdlib.h> int equals(char,char); int main(void){ char s1[] = "PRINT"; char s2[12]; (void)scanf("%s",s2); if(equals(s1,s2) == 1) printf("s2 = PRINT"); else printf("s2 != PRINT"); }