Why there is no difference in number of times loop run when using ++i vs i++?

Правка en1, от aviabhinn98, 2021-04-21 17:24:48

for(int i=0;i<n;i++) { }

vs

for(int i=0;i<n;++i){ }

Both these loop run n times but we know that ++i and i++ are different. So can anyone explain what is happening in backend in gcc compiler using cpp? Thanks in advance

Теги #cpp, for loop

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский aviabhinn98 2021-04-21 17:24:48 310 Initial revision (published)