The ++ won't have any effect in this program. This is because when you are given,
carr[i]=(char)c++;
The current valueof c will be assigned to the array variable and the c value will be incremented by one. But on the next iteration, a new value will be assigned to c. So, the increment to this value doesn't have any use here.
I have got another question here. This program compiles file though we are changing the value of final variable i (declared in main) in loop. Could you please suggest why it is working fine.
it is correct that each time the loop iterates a new final variable i is declared and is being assigned the value of array's current element. but what if i make the following changes int the loop:
it still compiles fine why is it so as i is a final variable??