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

Why do we use iterators?

718


When do we use copy constructors?

684


What do you mean by translation unit?

696


If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?

695


What is istream c++?

685






Is swift faster than go?

717


What is linked list in c++?

781


What is the use of 'using' declaration in c++?

719


How can you specify a class in C++?

895


What are the types of pointer?

642


Will a catch statement catch a derived exception if it is looking for the base class?

635


What are the advantages of pointers?

682


Differentiate between an array and a list?

811


Keyword mean in declaration?

677


Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?

648