Is there any difference between dlearations int* x and int
*x? If so tell me the difference?

Answer Posted / reejusri

There is no diffrence between int* x and int *x.
but difference will come into picture when you use:

Case 1:
int* x,y,z;

and

Case2:
int *x,y,z;

in first case x,y and z are integer pointer, where as
un second case only x is integer pointer rest y and z is
integer. So its always a good practice not to put multiple
variable in single line.

Is This Answer Correct ?    4 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a new be used in place of old mallocq? If yes, why?

639


What is algorithm in c++ programming?

591


Explain how we implement exception handling in c++?

580


What are advantages of using friend classes?

644


Is overriding possible in c++?

578






Who invented turbo c++?

609


Which function cannot be overloaded c++?

581


What is istream c++?

577


Why null pointer is used?

587


What is #include c++?

574


Array base access faster or pointer base access is faster?

1819


What is c++ prototype?

592


Which ide is best for c++?

552


What are protected members in c++?

623


Can I learn c++ without knowing c?

595