#include <stdio.h>
#include <string.h>

int main() {
    char str1[] = "Hello";
    char str2[] = "World";


    // printf("the result is %d", strcmp(str1, str2));

    /*
    strcmp works by comparing the ASCII values of the characters in the strings 1 by 1.
    If the ASCII value of the character in str1 is less than the ASCII value of
    the character in str2, then str1 is less than str2. For example, if I have to strings
    str1 = "hhhi" and str2 = "hhhz", then the first 3 characters are the same, but the
    ASCII value of 'i' is less than the ASCII value of 'z', so str1 is less than str2.
    */ 
    int result1 = strcmp(str1, str2);
    if (result1 < 0) {
        printf("str1 is less than str2\n");
    } else if (result1 > 0) {
        printf("str1 is greater than str2\n");
    } else {
        printf("str1 is equal to str2\n");
    }


    return 0;
}