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
How to declare an array of pointers to integer?
How do you declare A pointer to a function which receives nothing and returns nothing
What are the four partitions in which c++ compiler divides the ram?
What are the differences between the function prototype and the function defi-nition?
Can we use struct in c++?
Explain bubble sorting.
Define a pointer to a data member of the type pointer to pointer?
What are the advantages of pointers?
What is lambda expression c++?
How do you flush a buffer in c++?
Write about the local class and mention its use?
Implement stack operations with pointers with appropriate exception checks.
Explain what are the sizes and ranges of the basic c++ data types?
What is lambda in c++?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?