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

Answer Posted / reeju srivastava

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 ?    15 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

693


Is it possible to write a c++ template to check for a function's existence?

659


What is #include cstdlib in c++?

769


What is c strings syntax?

681


Explain container class.

801






What is an inline function in c++?

729


Why are pointers not used in c++?

711


What c++ library is string in?

690


What are the manipulators in c++?

627


Will c++ be replaced?

706


Explain linear search.

712


Which is most difficult programming language?

682


Difference between overloading vs. Overriding

692


What are the vectors in c++?

668


What are virtual constructors/destructors?

647