Why is a still 0 after that operation?

QuestionsOverQuestions

Why is a still 0 after the following operation?

int a = 0;
a+=a++;
Eran

a++ increments a but returns its previous value 0.

That's why a+=a++, which is equivalent to a=a+a++, sets a back to 0+0;

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Layout dimensions still return 0 even after onCreate()

분류에서Dev

Why the prevoius value still exists after reinitialaize variable - PHP

분류에서Dev

Why does my div still display when its height is set to 0?

분류에서Dev

Why do I still get duplicates on [CONMAT_MATCHING_DONOR] even after using DISTINCT?

분류에서Dev

Why I'm still couldn't run simultaneous connections after modified Automatic Matrics & Group Policy?

분류에서Dev

Why is my nsmutuablearray still null?

분류에서Dev

Why does this rename operation not work?

분류에서Dev

Rhythmbox still plays songs after exit

분류에서Dev

What Ubuntu alternatives will still be supported after 12.04

분류에서Dev

Does DROP after SELECT still yield data?

분류에서Dev

Findbugs marker still displays after fixing issue

분류에서Dev

After npm install -g, command still not found?

분류에서Dev

android after disableKeyguard the inKeyguardRestrictedInputMode() still return true

분류에서Dev

Encrypted home folder still accessible after logout

분류에서Dev

Variable value still zero after assigned a value

분류에서Dev

After Implementing an UITestPropertyProvider, AccessibleName is still not a valid Searchproperty

분류에서Dev

Android Binder thread is running after unbind operation

분류에서Dev

Get mysql SUM after mathematical operation

분류에서Dev

Operation error 2019 after deploying app

분류에서Dev

KeyDown Event Not Firing After Drag Drop Operation

분류에서Dev

adding up numbers after an if operation in R

분류에서Dev

Why is this printing 0?

분류에서Dev

Why webdriver continuously open for each operation?

분류에서Dev

After install next to Windows 8, no grub, Windows 8 still booting

분류에서Dev

Python: Even after an if runs, the else still runs as well

분류에서Dev

SHELL environment variable still points to zsh after using bash

분류에서Dev

Will a sql server product key still work after moving a virtual machine?

분류에서Dev

Is Sql Compact Edition database still readable after password protection and encryption?

분류에서Dev

after I disconnect the media, it still replies when I ping it

Related 관련 기사

  1. 1

    Layout dimensions still return 0 even after onCreate()

  2. 2

    Why the prevoius value still exists after reinitialaize variable - PHP

  3. 3

    Why does my div still display when its height is set to 0?

  4. 4

    Why do I still get duplicates on [CONMAT_MATCHING_DONOR] even after using DISTINCT?

  5. 5

    Why I'm still couldn't run simultaneous connections after modified Automatic Matrics & Group Policy?

  6. 6

    Why is my nsmutuablearray still null?

  7. 7

    Why does this rename operation not work?

  8. 8

    Rhythmbox still plays songs after exit

  9. 9

    What Ubuntu alternatives will still be supported after 12.04

  10. 10

    Does DROP after SELECT still yield data?

  11. 11

    Findbugs marker still displays after fixing issue

  12. 12

    After npm install -g, command still not found?

  13. 13

    android after disableKeyguard the inKeyguardRestrictedInputMode() still return true

  14. 14

    Encrypted home folder still accessible after logout

  15. 15

    Variable value still zero after assigned a value

  16. 16

    After Implementing an UITestPropertyProvider, AccessibleName is still not a valid Searchproperty

  17. 17

    Android Binder thread is running after unbind operation

  18. 18

    Get mysql SUM after mathematical operation

  19. 19

    Operation error 2019 after deploying app

  20. 20

    KeyDown Event Not Firing After Drag Drop Operation

  21. 21

    adding up numbers after an if operation in R

  22. 22

    Why is this printing 0?

  23. 23

    Why webdriver continuously open for each operation?

  24. 24

    After install next to Windows 8, no grub, Windows 8 still booting

  25. 25

    Python: Even after an if runs, the else still runs as well

  26. 26

    SHELL environment variable still points to zsh after using bash

  27. 27

    Will a sql server product key still work after moving a virtual machine?

  28. 28

    Is Sql Compact Edition database still readable after password protection and encryption?

  29. 29

    after I disconnect the media, it still replies when I ping it

뜨겁다태그

보관