I Do Not understand how tem[k++ ] works. if k = 1, will it get stores in index 2?

why is he doing temp[k++]?

hello @JaveedYara

this statement is equivalent to
temp[k]=something;
k++;

read the difference between prefix and posfix for better clarity.
article