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 encapsulation in oop?
write a c++ code of diagonal matrix.
diff between Abstract class Interfaces?
who is the father of OPPS
4. What do you mean by a prototype? Define analysis prototype
what is data abstraction with example.
What is an example of genetic polymorphism?
Program to check whether a word starts with a capital letter or not.
Base class has two public data members. How can i derive a new class with one datamember as public and another data member as private?.
what is opps?why it is use in programming language?
What is inheritance and how many types of inheritance?
Why is abstraction used?