Shweta Dubey said:
(Tue, Oct 26, 2010 06:56:50 AM)
P is a pointer to a constant
Kumaran said:
(Sun, Nov 14, 2010 01:57:40 PM)
P is the constant... It defined in the outside of main function.
Sunil said:
(Sat, Dec 4, 2010 11:03:09 AM)
here p is constant bcz of usage of keyword const
Santhosh said:
(Mon, Jan 31, 2011 02:21:38 AM)
her p is a pointer to a constant character
Hngn said:
(Tue, Feb 8, 2011 04:38:44 AM)
p is constant chracter pointer
Vikas Sharma said:
(Wed, Feb 16, 2011 12:28:06 PM)
P is a constant pointer.
Ana said:
(Sat, Mar 19, 2011 02:09:43 PM)
The answer is no clear to me. Can some one please explain.
Wikiok said:
(Sun, Apr 10, 2011 02:48:01 PM)
typedef char *charp;
const charp P;
so:
const char *P; // The value can not be changed at that memory location, but other memory locations can be used for *P.
*P=4; //ERROR
P=&a; //Works char a;
Lol said:
(Fri, May 6, 2011 03:43:08 AM)
The trick with const modifier is to read the statement backwards.
const charp P = const char *P;
So reading backwards you have P * char const
which is P is a pointer to a char constant.
Rocky said:
(Sun, Jul 24, 2011 01:34:15 AM)
p is constant or p is character constant???
please answer!!!!
Ravi said:
(Wed, Sep 21, 2011 05:01:55 PM)
P is a pointer to a constant.
Because,
Const char *p;.
Ganga said:
(Sun, Dec 4, 2011 09:45:12 PM)
const char *P; // The value can not be changed at that memory location, but other memory locations can be used for *P.
*P=4; //ERROR
P=&a; //Works char a;
Asd said:
(Mon, Dec 12, 2011 07:34:04 PM)
I think finally answer is p is a pointer to a character constant which is not in option so anwer is d.
Rupinderjit said:
(Thu, Jan 5, 2012 02:21:35 PM)
p can't be pointer, since with typedef we can't modify the actual base type,we just only give new name to existing type. That's all folks.
Lijina said:
(Tue, Jan 24, 2012 11:25:51 AM)
Option A is Right,
1. typedef char *charptr;
So charptr contain one address and *charptr contain any constant;
2. const charptr p;
If p='a' and &p=0x10;
Now charptr contain &p(0x10)
Only for address we are keeping const, not for value in that address. So P that is constant.