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
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
What is meant by iomanip in c++?
Explain the uses of static class data?
Why is it necessary to use a reference in the argument to the copy constructor?
What is the difference between set and map in c++?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include What is virtual destructor ans explain its use? Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened Is sorted c++? Write a c program for binary addition of two 8 bit numbers. What is the difference between an external iterator and an internal iterator? Is c++ the most powerful language? What is private, public and protected inheritance? What is the difference between public, private, and protected access? What is long in c++?