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
Why do we use iterators?
When do we use copy constructors?
What do you mean by translation unit?
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?
What is istream c++?
Is swift faster than go?
What is linked list in c++?
What is the use of 'using' declaration in c++?
How can you specify a class in C++?
What are the types of pointer?
Will a catch statement catch a derived exception if it is looking for the base class?
What are the advantages of pointers?
Differentiate between an array and a list?
Keyword mean in declaration?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?