You defined a macro SZIE
(I think you mean SIZE
) for the integer constant 1024
of the type int
.
#define SZIE 1024
So 1024
is not less than -1
.
Moreover as the operands have the type int
then and the result of the conditional operator has also the type int
and you need to use the conversion specifier d
instead of zu
in the call of printf. And it seems there is a typo \z
in the format string
printf("%\zu",SZIE<-1?1:0);
That is you need to write
printf("%d\n",SZIE<-1?1:0);
If you need to get the expected result you can write for example
printf("%d\n",( size_t )SZIE<-1?1:0);
Or it would be enough to introduce a constant of the type unsigned int
like
#define SZIE 1024u
and write
printf("%d\n",SZIE<-1?1:0);
In this case due to the usual arithmetic conversions the expression -1
having the type int
will be converted to the type unsigned int
producing a big unsigned value.
Pay attention to that independent of the condition expression of the conditional operator its result in any case has the type int
because the second and the third operands have the type int
. And the condition expression itself has the type int
and yields either 0
or 1
.