Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

c = c++ problem


  • From: julian.spina@xxxxxxxxx (Julian E.Spina)
  • Subject: c = c++ problem
  • Date: Fri, 31 Mar 2000 11:07:10 +0200

hello,
c=c++;

does first the assignment and then the increment, so the assignment
is c=c and the variable remains unchanged!

:)
Julian//

Rajesh Gupta wrote:

> hello all
>
>    i have a simple problem
>
>    int c = 10;
>    c = c++;
>
>     and c is still 10 !
>    if use c = ++c; this gives me 11 this is quite obvious.
> whats the logic behind c = c++ giving original value of c this ?
>
> thanks in advance
>
> Rajesh


---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx