answersLogoWhite

0

There is no such thing as a negative ASCII value. ASCII values are always in the range 0-255. In C++, a char is defined as an unsigned integer of 8-bits in length (wide chars are unsigned integers of 16-bit length). Since they are unsigned, they can never be negative.

C differs from C++ in that a C char is generally represented as a signed integer (typically 32-bits on a 32-bit system). However, when cast as a character, only the low-order byte is used, which effectively ignores the sign in the high-order byte. In other words, the absolute value is used, regardless of the sign. The same applies to wide characters.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

ReneRene
Change my mind. I dare you.
Chat with Rene
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan

Add your answer:

Earn +20 pts
Q: Where does negative ASCII value used?
Write your answer...
Submit
Still have questions?
magnify glass
imp