C Program to Compare Two Strings – Manual and strcmp()
This C program compares two strings and reports whether they are equal, or which one comes first in dictionary (lexicographic) order. Comparison works character by character: walk both strings together until two characters differ or a string ends, then decide from that first difference. This page shows a manual character-by-character implementation and the standard library …