tag:blogger.com,1999:blog-32064785.post6413288711818192757..comments2024-03-19T12:51:04.574+05:30Comments on Freshers Interviews: Basic C Questions to test ur expertise-4chaitanyahttp://www.blogger.com/profile/05855949584266440305noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-32064785.post-39617979714591678622011-04-02T15:28:50.160+05:302011-04-02T15:28:50.160+05:30Regarding the question:
"Difference between ...Regarding the question: <br />"Difference between const char* p and char const* p", the answer is that there is no difference. See, e.g. Straustrup, the C++ programming language, sec. 5.4.1: Pointers and constants. <br /><br />This is the correct answer:<br />1.<br />char *const cp; //const Pointer to a char - can't change the pointer, but can change the char.<br />2. char const* pc; //pointer to const char - can't change the characters, can change the pointer.<br />3. const char* pc2; //same as pc - pointer to const char.Matannoreply@blogger.com