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 |
WAP find square root of any number (without using sqrt() )?
why function overloading is not called as pure polymorphism?
Write a c++ program to display pass and fail for three student using static member function
What is abstraction oop?
What is data binding in oops?
Which is not an object oriented programming language?
Input: enter the value:1234 output: 1 2 3 4 write a program to get above output.....
4 Answers Bally Technologies, IBM, SoftSol,
when my application exe is running nad i don't want to create another exe what should i do
Can you name some types of inheritance?
What is coupling in oop?
Which is the parameter that is added to every non-static member function when it is called?
write a c++ program to find maximum of two numbers using inline functions.