Total C newbie here. When I run the following code:
int main(int argc, char *argv[])
{
int unsigned x = 1;
printf("%d\n", x);
x = x - 2;
printf("%d\n", x);
}
I get the output:
1 -1
i.e. signed output.
The compilation command was cc -Wall -g -fno-stack-protector exCurrent.c -o exCurrent
and I ran this on a recent macOS 10.14.
What's happening?