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

Answer Posted / hrpynux@gmail.com

There is no difference between const char *p and char const *p as both are pointer to a const char and position of '*'(asterik) is also same. 2. char *const ptr : This is a constant pointer to non-constant character. You cannot change the pointer p, but can change the value pointed by ptr.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between array and vector in c++?

564


What is binary search in c++?

570


How many types of classes are there in c++?

602


What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass

693


What is pointer in c++ with example?

522






What is c++ namespace?

712


What is the purpose of templates in c++?

569


What is the auto keyword good for in c++?

627


When does a name clash occur in c++?

719


What does flush do?

566


Difference between pass by value and pass by reference?

607


Can I learn c++ as my first language?

611


Describe protected access specifiers?

679


How would you obtain segment and offset addresses from a far address of a memory location?

622


What are the methods of exporting a function from a dll?

652