What is the output?

int j=0; for(int i =0;i<100;i++) { j=j++; } print j;


@EedulakantiKumargoudDharma Nope, 99 is the wrong answer!

100 should be the answer

0 is the answer...the value of j never changes..

@AbhijeetSaxena was that a joke??

5050 sum of 1 to 100

sorry ....100

@rishi 99

Answer is
101

Guys,
@AbhijeetSaxena is absolutely correct, the answer is 0. The clue here is post increment. The way it works behind the scenes is 
temp= j;
j=j+1;
j=temp;You should definitely try writing the code for the same to see the result.

99 will be the answer

@VaishnaviUmathe Check the below link for the code. Let us know if you have any issues running it.

98 is output

@NaveenNS Hi Naveen please check the link for the code https://onlinegdb.com/ryxH9qxtV
The answer is 0.

@rishi 100 is the output

@AnkushRawat  The answer is 0. Kindly check the link for the sample code here  https://onlinegdb.com/ryxH9qxtV. The value of j never changes from 0.

@rishi 99

@rishi 0

@AnshikaKhandelwal  correct 0