C language undefined behavior

Source: Internet
Author: User
1. Whether or not to retain the sign bit when the character is extended to the integer type. Some implement to retain the sign bit, and some directly fill the sign bit with 0 at the high level without retaining the sign bit.
2. When the right shift is performed, the value of the blank bit is filled. Some C languages are used to fill 0, while others are used to fill the sign bit.
3. Shift count restrictions. For example, for int type data, it is usually the number of digits not exceeding this type, that is, the shift to int type data cannot exceed 32.
4. The memory location is 0. Some C languages implement hardware-level protection for the 0 memory location and do not allow read/write; some implement read-only; others implement read-only and writable. 5. If (a) Main calls exit or _ exit without termination, or (B) Main executes a return statement without return values, or (c) if an implicit return is executed for main, the termination status of the process is undefined.

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.