Top "Unsigned" questions

An unsigned variable is a variable that can only represent non-negative numbers.

Calculating bits required to store decimal number

This is a homework question that I am stuck with. Consider unsigned integer representation. How many bits will be required …

decimal unsigned unsigned-integer
Unsigned values in C

I have the following code: #include <stdio.h> int main() { unsigned int a = -1; int b = -1; printf("%…

c printf unsigned
How to cast or convert an unsigned int to int in C?

My apologies if the question seems weird. I'm debugging my code and this seems to be the problem, but I'm …

c casting types int unsigned
What is the difference between signed and unsigned variables?

I have seen these mentioned in the context of C and C++, but what is the difference between signed and …

language-agnostic variables unsigned
Unsigned keyword in C++

Does the unsigned keyword default to a specific data type in C++? I am trying to write a function for …

c++ unsigned
Why doesn't Java support unsigned ints?

Why doesn't Java include support for unsigned integers? It seems to me to be an odd omission, given that they …

java language-design unsigned integer
How to use the unsigned Integer in Java 8 and Java 9?

In the Oracle "Primitive data types" page, it mentions that Java 8 adds support for unsigned ints and longs: int: By …

java java-8 unsigned
should use size_t or ssize_t

At my code, I do not use int or unsigned int. I only use size_t or ssize_t for …

c++ unsigned signed size-t
Is unsigned integer subtraction defined behavior?

I have come across code from someone who appears to believe there is a problem subtracting an unsigned integer from …

c standards unsigned integer-arithmetic
what is the unsigned datatype?

I've seen this unsigned "typeless" type used a couple of times, but never seen an explanation for it. I suppose …

c types unsigned