Is there any difference between dlearations int* x and int
*x? If so tell me the difference?

Answer Posted / debendra nath tiwary

there is no difference between them here.
but difference comes how we use them.
(int*) can be used for typecasting.
(int *x) is used for declaration purpose. here x is declared as pointer variable.
even if declare like (int* x) is valid but not a formal way to
to declare pointer variable.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is copy constructor? Can we make copy constructor private in c++?

599


What is pair in c++?

630


How do you define/declare constants in c++?

613


Explain one method to process an entire string as one unit?

936


What are the 3 levels of programming languages?

539






What is do..while loops structure?

620


What are guid? Why does com need guids?

570


what are the characteristics of Class Members in C++?

595


What is the role of static keyword for a class member variable?

631


What is c++ redistributable?

625


Is it possible to provide default values while overloading a binary operator?

767


What is capacity in vector in c++?

551


What is the use of endl in c++ give an example?

618


What is c strings syntax?

610


What is general form of pure virtual function? Explain?

513