Programming Misconceptions #5: i++ vs ++i - prefix vs postfix increment or decrement operators

preview_player
Показать описание
In this video, we are going to learn about the difference between prefix and postfix.
------------------------------------------
-------------------------------------------
-------------------------------------------
Рекомендации по теме
Комментарии
Автор

Ok that's nice but didn't you forget to say that overall if you just want to increment a variable without caring about post/prefix you should use prefix due to it's lower operation requirement?

TheFox
Автор

Good explanation. Wonder why there's many dislikes.

sajan
Автор

main()
{
int count, digit=0;
count=1;
while(digit<=9)
{
printf("%d\n", ++count);
++digit;
}
}
Ans is 11
How is it working ?

pritamsarbajna