Your Ad Here
0

Difference between const char* p and char const* p ?

Posted by The Blogger on 9:22 AM in
Answer:

In const char* p, the character pointed by ‘p’ is constant, so u can't change the value of character pointed by p but u can make ‘p’ refer to some other location.

in char const* p, the ptr ‘p’ is constant not the character referenced by it, so u can't make ‘p’ to reference to any other location but u can change the value of the char pointed by ‘p’.



tags: c interview questions and answers, c interview question Difference between const char* p and char const* p, Difference between const char* p and char const* p

0 Comments

Post a Comment

Your Ad Here

Copyright © 2009 Interview Questions and Answers