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 C++ exceptional handling?

627


What is the difference between structures and unions?

580


What is c++ flowchart?

675


Describe exception handling concept with an example?

558


Can user-defined object be declared as static data member of another class?

552






How can you say that a template is better than a base class?

580


Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

614


Explain function overloading and operator overloading.

618


What is data abstraction? How is it different from data encapsulation?

531


What is operators in c++?

565


What is a try block?

635


Specify some guidelines that should be followed while overloading operators?

616


Describe protected access specifiers?

675


Write about a nested class and mention its use?

628


explain the reference variable in c++?

573