What is the difference between const int *ptr and int const
*ptr???
Answers were Sorted based on User's Feedback
a) const int *ptr and
b) int const *ptr
Both actually mean the same...
Read from Right to left:
for(a):-> ptr is a pointer to an integer Constant and
for(b):-> ptr is a pointer to a constant integer...
..............
int *const ptr----------> ptr is a constant pointer to an
integer...
| Is This Answer Correct ? | 95 Yes | 26 No |
Answer / abdul sami
'const int* ptr' means the value whose address is being
held by ptr is constant and cant be changed while
'int const *ptr' means the pointer cant be changed like it
cant be incremented or decremented although you can change
the date pointed to by ptr.
| Is This Answer Correct ? | 41 Yes | 57 No |
What is a friend function & its advantage?
What is encapsulation example?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
can you give real time example for polymarphism
what is object oriented programming and procedure oriented programming?
which are the 4 members functions in c++ objects that can either be declared explicitly by programmer or implementation if nt available.
difference between class and object
10 Answers Chandan, IBM, Magic Soft,
sir plz send me a set of questions that been frequently held in written examination during campus selection.
monkey starts climbing up a tree 20ft tall,each hour ,it hops 3ft and slips back by 2ft .how much time it wil tak to reach top of the tree?
different types of castings
Why interface is used?
what is new operator in c++