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
What is the type of 'this' pointer?
Is c++ high level programming language?
Explain pass by value and pass by reference.
State two differences between C and C++.
What are the two types of comments, and how do they differ?
What is the difference between #import and #include in c++?
What is the difference between an array and a list?
How do you add an element to a set in c++?
How many types of scopes are there in c++?
What are c++ manipulators?
what is COPY CONSTRUCTOR and what is it used for?
What is java and c++?
What do you mean by persistent and non persistent objects?
Should you pass exceptions by value or by reference?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].