[C/C ++ Notes] High-byte and Low-byte Dynamic Language and static language

Source: Internet
Author: User
1) byte order, as the name implies, the second sentence is the order in which data of the same byte type is stored in the memory (the sequence of data of the same byte is not required ). In fact, most people rarely deal with the byte sequence directly in actual development. Only cross-platform and network programs should be considered in the byte sequence. In all the articles about the byte sequence, we mentioned that the byte sequence is divided into two types: Big-Endian and little-Endian. The definitions of the standard Big-Endian and little-Endian are as follows: a) Little-Endian is the low-byte emission at the low-address end of the memory, and the high-byte emission at the High-address end of the memory. B) Big-Endian refers to the low address of the memory where the high byte is discharged, and the low byte is discharged to the high address of the memory. C) network byte sequence: TCP/IP Protocols define the byte sequence as big-Endian. Therefore, the byte sequence used in TCP/IP is usually called the network byte sequence. Directly run the code: int A = 0x05060708;
Char * Ch = (char *) &;
Printf ("% d, % d", * (CH + 3), * (CH
+ 2), * (CH + 1), * Ch); On vs, the compiled output is: 5, 6, 7, and 8. The high byte is displayed in the high address, indicating the low byte order. 2) force conversion of Char to unsigned char. If char is a negative number, it is valid in C ++, and the result is the value after the negative number is calculated for the number of values of this type. If-1 is assigned to an 8-bit unsigned char, the result is 255. 3) Dynamic and Static languages:

A strong language (static Language) is a language that requires variable/object type declaration. It usually needs to be compiled and executed. For example, C/C ++/Java/C #

A weak language (Dynamic Language) is a language that does not require variable/object type declaration. Generally, compilation is not required (but compilation is also required ). For example, PHP/asp/Ruby/Python/perl/ABAP/SQL/JavaScript/Unix shell.

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.