Y
Ying Yang
Kevin Goodsell said:No, it can't. If you believe it can, please give an example.
int i; //declared but not initialised
i =5; // variable i is initialised with value 5.
Well, you can't give something its initial value twice, so I assume you
mean "one of the following ways".
what are you smoking?
...But you're still wrong. Assignment does not give an initial value to
something. Assignment can only happen to an existing object. Since the
object must exist prior to the assignment, it clearly has already
received its initial value.
Assignment can be used for both objects types and primitive types. And i was
referring to initialising data members of a class type. Again, what are you
smoking?