0 votes
in General Knowledge by (773k points)
What is the value of -1 < 1? -1 < 1u?

1 Answer

0 votes
by (773k points)
 
Best answer
First is true, but second is false.

"u" is the unsigned relational operator. It turns -1 into its unsigned representation. Since -1 is stored as 0xFFFFFFFF (4 byte int), when interpreted as unsigned, this is the largest int value in 32 bits, which is indeed not less than 1.
Welcome to the Answerine , a great place to find, read and share your favorite questions and answers.
...