Frequency analysis based anagram checker
Avoid magic numbers, especially if they, like 26 in your code, are used repeatedly. Along the same line, keep in mind that the code only works in the "C" locale. Other locales may have alphabets of different size.
Prefer to declare variables as close to use as possible, e.g.

    for (size_t i = 0; i &lt; l1; ++i) {
        int index1 = s1[i] - 'a';
        int index2 = s2[i] - 'a';
        ....

If the string contains non-lowercase characters, the code would do an out-of-bound access. You should ensure islower(s[i]) prior to computing indices, and ask the interviewer about what are the guarantees.
An opportunistic if (l1 != l2) return 0; is not an optimization. It still require a linear time to compute the lengths.
Along the same line, length computation is not necessary. An idiomatic C approach is to us pointers:

while ((ch = *s++) != 0)

The bullets above suggest splitting the loop into two:

while ((ch = *s1++) != 0) {
    if (islower(ch)) {
        alphabet[ch - 'a']++;
    }
}

while ((ch = *s2++) != 0) {
    if (islower(ch)) {
        alphabet[ch - 'a']--;
    }
}

Now, a DRY principle require factoring this loops into a function:

static void count_frequencies(char * s, int * alphabet, int addend) {
    while ((ch = *s++) != 0) {
        if (islower(ch)) {
            alphabet[ch - 'a'] += addend;
        }
    }
}

....
    count_frequencies(s1, alphabet, 1);
    count_frequencies(s2, alphabet, -1);


As a perk benefit, see how the /* count the frequencies of characters */ disappears.
For a very long string the integer in alphabet may overflow. Could be a nitpick, but could also be a failure, depending on the interviewer.