basics · beginner · ~15 min
Compare two strings character by character.
Implement int str_equal(const char *a, const char *b) returning 1 if the strings are identical, else 0 — without calling strcmp.
int str_equal(const char *a, const char *b) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.