Now whenever you see a post increment Mark that place ,evaluate the expression and then come back and increment it.
so here. initially n=1,sum=0
while(n<=10)..this is satisfied so it enters the loop
sum=sum+n++*n++
here is the sequence -> sum=0+1*1=>sum=1,n=3
sum=1+3*3=>sum=10,n=5
sum=10+5*5=>sum=35,n=7
sum=35+7*7=>sum=84,n=9
sum=84+9*9=>sum=165,n=11->now at this point the it will exit the loop
so we have sum=165