C exam
(Judge big-end and small-end mode) Question 1: Write a c function. If the processor is big_endian, 0 is returned. If little_endian is used, 1 is returned.
Answer:
Int checkcpu ()
{
{
Union W
{
Int;
Char B;
} C;
C. A = 1;
Return (C. B = 1 );
}
Big-endian format, small-end formatBig-endian format:In this format, the high byte of the character data is stored in the low address, while the low byte of the word data is stored in the high address, 2.1:Figure 2.1Small End Format:In contrast to
Reprint Please specify source: http://blog.csdn.net/dmk877/article/details/49420141Whether you are a novice programmer or an old hand, you must feel particularly familiar with string, because the string class has been learned since we learned Java
[C #] There is no unspeakable secret between string, big S, and small S,There is no unspeakable secret directory between string, String, big S, and small S.
Lowercase string and uppercase String
Declare and initialize a string
Immutable string
First, the origin of the big-endian mode and the small-end modeThere is an interesting story about the origin of the small end nouns, from Jonathan Swift's Travels of Gulliver: The two powerful powers of Lilliput and Blefuscu have been fighting for
The origins of big-endian and small-end patternsThere is an interesting story about the origin of the small end nouns, from Jonathan Swift's Travels of Gulliver: The two powerful powers of Lilliput and Blefuscu have been fighting for the past 36
"Big-endian" and "small end" can be traced back to Jonathan Swift's "Gulliver's Travels" in 1726, and one of the two countries was arguing over whether to break the larger end first or break the smaller end first, or even burst into war. In October 1
What are big endian and little endian?
We generally translate endian into byte order, and call Big endian and little endian "Big tail" and "Small Tail ".
2. What are big endian and little endian?
When designing a computer system, there are two
F5 BIG-IP Server Load balancer configuration instance and Web Management Interface experience [original] Big | medium | small [| by banquet] [Author: Zhang banquet this article version: V1.0 last modified: for more information, see
In various computer architectures, the storage mechanisms for bytes and words are different, which leads to a very important issue in Computer Communication domains, that is, the order in which information units (bit, byte, word, double-word, etc.)
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.