#include <stdio.h>
#include <string.h>
int main()
{
const char str[11]= "Hello World";
if(-1 > strlen(str)){
printf(str);
}
return 0;
}
This if condition should always return false. But here it's not.
But if I put strlen(str)
value to another variable and compare with that, then it works as expected.
What I am missing here?
Is it compiler dependent or something?