Re: [algogeeks] Re: Differentiate the following declarations.

2012-06-12 Thread Mad Coder
*const char* a* is *equivalent* to *char const * a* A simple method which most people use in coding is that const is written after the value which needs to be constant. So, *char const *a* means a is a pointer that points to a character which is a constant i.e you can not change the value which a

[algogeeks] Re: Differentiate the following declarations.

2012-06-08 Thread Navin Gupta
Using Spiral-Anderson rule, 1:- const char * a - a is a pointer to char const (character which is constant , the value pointed by the pointer is constant) 2:- char * const a - a is a const pointer to char (pointer is constant, it always point to same memory location) 3:- char const * a - a is a