What is the difference between const int *ptr and int const
*ptr???

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pure oop?

886


What is abstraction example?

872


What is polymorphism used for?

806


what is difference between class template and template class?

2435


What is oops and its features?

867


why reinterpret cast is considered dangerous?

2153


What is abstraction in oop with example?

893


What is encapsulation selenium?

788


Why is abstraction needed?

789


What is the fundamental idea of oop?

896


What is the real time example of inheritance?

898


What is the advantage of oop over procedural language?

867


what type of question are asked in thoughtworks pair programming round ?

1997


What is the problem with multiple inheritance?

875


What is encapsulation with real life example?

815