Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / manjunath

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

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

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

Post New Answer

More OOPS Interview Questions

What is encapsulation in oop?

0 Answers  


write a c++ code of diagonal matrix.

2 Answers  


diff between Abstract class Interfaces?

4 Answers  


who is the father of OPPS

4 Answers   Infosys, TCS,


4. What do you mean by a prototype? Define analysis prototype

1 Answers  


what is data abstraction with example.

1 Answers  


What is an example of genetic polymorphism?

0 Answers  


Program to check whether a word starts with a capital letter or not.

1 Answers   Infosys,


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?.

2 Answers  


what is opps?why it is use in programming language?

2 Answers   Wipro,


What is inheritance and how many types of inheritance?

0 Answers  


Why is abstraction used?

0 Answers  


Categories