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



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

Answer / 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

More C++ General Interview Questions

Define a way other than using the keyword inline to make a function inline?

1 Answers  


What is c++ vb?

0 Answers  


What is heap sort in c++?

0 Answers  


What do you mean by enumerated data type?

0 Answers  


Can you pass an array to a function in c++?

0 Answers  






A milk carton can hold 3.78 litres of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one litre of milk is $0.38, and the profit of each carton of milk is $0.27. Write a C++ program that prompts the user to enter the total amount of milk produced in the morning. Then display the number of milk cartons needed to hold milk, the cost of producing milk, and the profit for producing milk.

2 Answers  


What is a syntax in c++?

0 Answers  


What is the main purpose of c++?

0 Answers  


Explain the different access specifiers for the class member in c++.

0 Answers  


Why pointer is used in c++?

0 Answers  


In java a final class is a class that cannot be derived. How can you make a similar class in C++

1 Answers  


List the merits and demerits of declaring a nested class in C++?

0 Answers  


Categories