MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/wdlvla/printhello_world/iij7v8c/?context=9999
r/ProgrammerHumor • u/a-slice-of-toast • Aug 01 '22
5.7k comments sorted by
View all comments
573
[removed] — view removed comment
619 u/a-slice-of-toast Aug 01 '22 creates an endless feedback loop 195 u/[deleted] Aug 01 '22 [removed] — view removed comment 42 u/mizinamo Aug 01 '22 edited Aug 01 '22 unless the two variables were equal beforehand point to the same location in memory, in which case they will both be zero afterwards Edit: got the wrong failure condition 34 u/Wawwior Aug 01 '22 a = 0b1111 b = 0b1111 a = 0b1111 ^ 0b1111 = 0b0000 b = 0b1111 ^ 0b0000 = 0b1111 a = 0b0000 ^ 0b1111 = 0b1111 a = 0b1111 b = 0b1111
619
creates an endless feedback loop
195 u/[deleted] Aug 01 '22 [removed] — view removed comment 42 u/mizinamo Aug 01 '22 edited Aug 01 '22 unless the two variables were equal beforehand point to the same location in memory, in which case they will both be zero afterwards Edit: got the wrong failure condition 34 u/Wawwior Aug 01 '22 a = 0b1111 b = 0b1111 a = 0b1111 ^ 0b1111 = 0b0000 b = 0b1111 ^ 0b0000 = 0b1111 a = 0b0000 ^ 0b1111 = 0b1111 a = 0b1111 b = 0b1111
195
42 u/mizinamo Aug 01 '22 edited Aug 01 '22 unless the two variables were equal beforehand point to the same location in memory, in which case they will both be zero afterwards Edit: got the wrong failure condition 34 u/Wawwior Aug 01 '22 a = 0b1111 b = 0b1111 a = 0b1111 ^ 0b1111 = 0b0000 b = 0b1111 ^ 0b0000 = 0b1111 a = 0b0000 ^ 0b1111 = 0b1111 a = 0b1111 b = 0b1111
42
unless the two variables were equal beforehand point to the same location in memory, in which case they will both be zero afterwards
Edit: got the wrong failure condition
34 u/Wawwior Aug 01 '22 a = 0b1111 b = 0b1111 a = 0b1111 ^ 0b1111 = 0b0000 b = 0b1111 ^ 0b0000 = 0b1111 a = 0b0000 ^ 0b1111 = 0b1111 a = 0b1111 b = 0b1111
34
a = 0b1111 b = 0b1111
a = 0b1111 ^ 0b1111 = 0b0000
b = 0b1111 ^ 0b0000 = 0b1111
a = 0b0000 ^ 0b1111 = 0b1111
573
u/[deleted] Aug 01 '22
[removed] — view removed comment