Reprint Address: http://hi.baidu.com/thewillreigns/blog/item/67e665c4296e69c038db492d.html
Char and unsigned char are unsignedBoth are used words as words that are indistinguishable, but when integers are used differently:Char integer range is-128
ObjectiveI read a lot of information, only to write this article, if there are errors, please put forward the reader in time.In general, when you use Remote Desktop to connect to Windows Server, there is always a warning prompt, 1Figure 1This
1 int i=3; 2 cout1;ask what the result is. First reaction:-3. But the result does not seem like this, wrote a program, ran a bit, found that:4294967293. 1) on a 32-bit machine, the int and unsigned int are 32 bits (4 bytes). 2) enum will be
Ansi c provides three types of characters: Char, signed Char, and unsigned char. There are only two types of characters like short and INT (INT is unsigned int by default ).
Each of the three occupies 1 byte. Therefore:
The value range of signed
Town Field Poem:——— Dream who feel, the water month Build blog. Baiqian tribulation, only know the vicissitudes of the world.——— today holds the Buddhist language, the technology is boundless willing to learn. Willing to do what you learn, cast a
Contents
Hexadecimal
Memory ANALYSIS OF VARIABLES
Type specifier
Bitwise operation
Char type
Go back to top 1. hexadecimal 1. What is hexadecimal
1> it is a counting method, which represents a value.
Count the number of
In C #, December 2, December 8, and hexadecimal notation are converted to a decimal positive number,
I once thought about the problem of converting other hexadecimal to signed integer. I found it so easy only after I thought of a solution.
1.
A piece of code (1) -- unsigned and signed, unsignedsignedSymptom:
Let's take a look at a piece of code:
The output result of this Code is:
-84
4294967264Analysis:
xiaoqiang@dev:~/cpp$ g++ -g c212.cc -o tempxiaoqiang@dev:~/cpp$ lsc143.cc c144.cc
Bash implements the 10-in-and 16-in conversion between each other in the linux bash to directly implement the 10-in-, 16-in-, and 2-in conversion: 1. echo & amp; #39; obase10; 10 & amp; #39; | bc10echo & amp; #39; obase2; 10 & amp; #39; |
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.