Comparing Two Strings
Learn how to compare two strings in C.
We'll cover the following...
We'll cover the following...
The strcmp() function
The strcmp( ) function is used to compare whether or not two strings are equal. The basic syntax of the strcmp() function is given below:
int strcmp(const char *str2, const char *str1);
The order of passing base addresses to strcmp( ) must always be the target, followed by the source.
🧠Quick question: Can we compare two strings using the following expression? ...