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

Answer Posted / prasant

Reejusri is correct....
VC++ compiler complains with error
"error C2440: '=' : cannot convert from 'int' to 'int *'
1> Conversion from integral type to pointer type
requires reinterpret_cast, C-style cast or function-style
cas" for the following code

int *x,y,z;
x=y;

So, there is a difference.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c++ still popular?

589


What is doubly linked list in c++?

637


What is the history of c++?

560


What is while loops?

619


What are multiple inheritances (virtual inheritance)?

585






What is input operator in c++?

591


What are the implicit member functions of class?

597


Explain about vectors in c ++?

598


What is the difference between the compiler and the preprocessor?

619


What c++ is used for?

587


Are vectors passed by reference c++?

521


How does a C++ structure differ from a C++ class?

628


Is c++ harder than java?

572


How do we implement inheritance in c++?

591


How do you find out if a linked-list has an end? (I.e. The list is not a cycle)

605