Copy codeThe Code is as follows: # include
Int main (int argc, char * argv [])
{
Unsigned int max_int = 0-1;
Printf ("The max value of unsigned int on 32 machine: % u/n", max_int );
}
Copy codeThe Code is as follows: # include Int main (int argc,
Copy Code code as follows:
#include
int main (int argc, char *argv[])
{
unsigned int max_int = 0-1;
printf ("The max value of unsigned int on machine:%u/n", max_int);
}
Copy Code code as follows:
#include
Some people have mentioned the difference between char and unsigned char recently. Of course, if you have just learned a computer orProgramming LanguageIt is very simple for people. In my opinion, it is nothing more than the difference between
Program design principles for signed and unsigned numbers:
Use a signed number (such as int) when you want to represent a numeric value.
When you need to represent a bit collection, use an unsigned number (such as unsigned int).
Today, online brush questions, one of the problems always results and expectations are not the same, in time and again check the program logic, confirm the correct, or can not pass, forced to use vs Start debugging!Here is my program code:1
Inside the computer, all of our information is made up of binary numbers.The symbolic number of the table real method:
The number of symbols is in the form of a complement within the computer
A positive complement of positive digits
unsigned is not a negative number, use this type to increase the length of the data! For example if tinyint max is 127, that tinyint unsigned Max to 127 * 2 Unsigned property
$sql = "UPDATE ' dzxbbs_common_member ' SET newprompt=newprompt-1 WHERE uid= ' {$uid} '";
The type of newprompt in the ' dzxbbs_common_member ' table is the type of smallint unsigned length 6.
When the Newprompt value is 0 o'clock, execute this
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.