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


Please Help Members By Posting Answers For Below Questions

Is c++ the best programming language?

543


What is capacity in vector in c++?

551


What is std :: endl?

596


describe private access specifiers?

646


How does list r; differs from list r();?

696






What is the exit function in c++?

545


write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num

2202


How do I use turbo c++?

552


give me an example for testing a program showing the test path .show how the test is important and complex.

2432


Is c++ a good beginners programming language?

586


How do we implement inheritance in c++?

592


What operator is used to access a struct through a pointer a) >> b) -> c) *

598


What is the type of 'this' pointer?

605


Does c++ cost money?

584


What are the uses of c++ in the real world?

567