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
Explain data encapsulation?
Why #include is used?
What is the best c++ compiler for windows 10?
which of the following is not an secondary constant a) array b) real c) union
List down the guideline that should be followed while using friend function.
What is the use of "new" operator?
When is the copy constructor called?
What is a local variable?
What relational operators if statements in c++?
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
What is iterator c++?
Explain what happens when a pointer is deleted twice?
What are vtable and vptr?
What is pure virtual function?
Can a program run without main function?