Level 2 pointer and multi-level pointer, level 2 pointer multi-level pointer

Source: Internet
Author: User

Level 2 pointer and multi-level pointer, level 2 pointer multi-level pointer

# Include <iostream> int main (int argc, char ** argv) {int I = 0; int * p = & I; int ** pp = & p; ** pp = 100; printf ("% d \ n", I); printf ("I address value: % p \ n", & I ); printf ("p value: % p \ n", p); printf ("p address value: % p \ n", & p ); printf ("pp value: % p \ n", pp); printf ("pp address value: % p \ n", & pp ); printf ("* pp value: % p \ n", * pp); printf ("** pp value: % d \ n", ** pp ); // similarly, a multi-level pointer is a pointer higher than a second-level pointer. It will actually be used less in the future, because the logic will be very confusing // The problem should be considered comprehensively, but it should be implemented in the simplest way as much as possible. // The subsequent steps are basically conceptual. Int *** ppp = & pp; printf ("ppp value: % p \ n", * ppp); return 0 ;}

:

Multilevel pointer:

Related Article

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.