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
What is virtual base class?
What does iomanip mean in c++?
Explain how an exception handler is defined and invoked in a Program.
What is called array?
Search for: what is pair in c++?
How do I download c++?
Why is c++ still best?
What is a driver program?
Why is c++ called oops?
Explain terminate() and unexpected() function?
Define a constructor - what it is and how it might be called (2 methods)?
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What is a literal in c++?
What is the use of data hiding?
Explain one-definition rule (odr).