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 the meaning of c++?
What can I safely assume about the initial values of variables which are not explicitly initialized?
Describe the process of creation and destruction of a derived class object?
What is basic if statement syntax?
What are pointer-to-members? Explain.
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
What is #include iostream?
What is & in c++ function?
If all is successful, what should main return a) 0 b) 1 c) void
What is tellg () in c++?
Can we define function inside main in c++?
Why c++ is created?
If dog is a friend of boy and boy is a friend of house, is dog a friend of house?
What do you mean by delegate? Can a user retain delegates?
What is the c++ programming language used for?