Views on the bug of the compiler in deep anatomy of C language (Chen zhengchong) 4.1.5

Source: Internet
Author: User

I wanted to post it to the author's blog but could not find the address.

I will not write the details of the original article, but I want to point out the following:

I did not dare to say this was a bug in vc6.0, but my result is that the address of the first variable defined by vc6.0 is 0x12ff7c !!!

This explains the problems mentioned in this article!

When the first variable defined is a pointer, the address of this pointer variable is 0x12ff7c! Therefore, * P = NULL indicates that the address (that is, P) is null!

As for the code above, the pointer occupies 4 bytes, And the char character occupies 1 byte, that is, the explanation in this article.

 

Define the pointer at the beginning, and then change the value of pointer P to 0x12ff7c!

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.