const char *
char * const
What is the differnce between the above two?
Answer Posted / vidushi
Both are the method to declare a character pointer. but char
*const means pointer is sticked to accept a single address
but in case of const char * means u can assign it to
different variable address to it.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
What is the object serialization?
How do you save a c++ program?
What do you mean by ‘void’ return type?
What is malloc in c++?
What is class definition in c++ ?
Explain rethrowing exceptions with an example?
What is dynamic and static typing?
give me an example for testing a program showing the test path .show how the test is important and complex.
What language is a dll written in?
Where can I run c++ program?
What is a constructor in c++ with example?
Why is the function main() special?
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What are built-in functions? What is the syntax for the definition?