Click here to Skip to main content
12,881,824 members (29,121 online)
Click here to Skip to main content
Articles » Languages » C / C++ Language » General » Alternatives
Add your own
alternative version

Tagged as

Stats

2.7K views
2 bookmarked
Posted 15 Jan 2010

Looking at pointer declarations

, 15 Jan 2010 CPOL
It is very simple :laugh: and fun ..just divide the line before and after * , likeconst int * pconst int (before *) represent [constant integer]and *p represent a pointer add both u get a pointer pointing to a constant integer , it means u can't change value but pointer can...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

12 Jan 2010
KingsGambit
1 alternative  
When we look at pointer declarations, reading from right-to-left gives a better idea about what the pointer actually points to. Consider const int * p; if we read right to left: p -> * -> int -> const. i.e. 'p is a pointer to an integer constant' rather than 'constant integer pointer' (if we...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

avinash064
United States United States
No Biography provided

| | Privacy | Terms of Use | Mobile
Web01 | 2.8.170422.1 | Last Updated 16 Jan 2010
Article Copyright 2010 by avinash064
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid