[C Knowledge Point]char unsigned char signed char knowledge point

Source: Internet
Author: User

1.char,unsigned Char, signed char is a single byte.

A 2.signed char range of 128-127 0000 0000 means +0 1000 0000 represents-0. The values of +0 and 0 represent the same value. In order not to waste this bit with 1000 0000 means 128
The unsigned char range is 0-256.
3. Char is interpreted as signed char or unsigned char, depending on the compiler.

The 4.VC compiler, GCC on x86, defines Char as signed char, while ARM-LINUX-GCC defines char as unsigned char.

5.signed Char and unsigned char are represented in memory as a binary string of 01 combinations, different only in the way they are interpreted. There is also a point that is not assigned to int, the high-level extension is different.


Reference URL:

"1" http://blog.sina.com.cn/s/blog_5a3744350100xapg.html

"2" http://cppkey.com/archives/318





[C Knowledge Point]char unsigned char signed char knowledge point

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.