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 |
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
What is polymorphism give a real life example?
inheritence with example
how do you handle yourself when you feel the wald is aganist you
What does oop mean in snapchat?
What is oops in programming?
What is overriding vs overloading?
what is use to destroy an object? illustrate.
Write a program in c++ to read two floating point numbers and find their sum and average.
Why do we use inheritance?
what is virtual destructor
Which is the parameter that is added to every non-static member function when it is called?