'Weird strcmp returns in C

Why is this code printing 202? The ascii value of 'e' is 101 and that of null character is 0. So shouldn't it print 101?

But when I interchange s1 and s2, I do get -101 as the answer.

#include<stdio.h>
#include<string.h>
int main(int argc, char *argv[])
{
    char s1[50] = "ape";
    char s2[50] = "ap";
    printf("%d ", strcmp(s1, s2));
    return 0;
}


Solution 1:[1]

"So shouldn't it print 101?"

No. strcmp() only needs to return some positive value in this case.

The strcmp function returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string pointed to by s2.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1