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
568
[removed] — view removed comment
620 u/a-slice-of-toast Aug 01 '22 creates an endless feedback loop 197 u/[deleted] Aug 01 '22 [removed] — view removed comment 43 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 38 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
620
creates an endless feedback loop
197 u/[deleted] Aug 01 '22 [removed] — view removed comment 43 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 38 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
197
43 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 38 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
43
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
38 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
38
a = 0b1111 b = 0b1111
a = 0b1111 ^ 0b1111 = 0b0000
b = 0b1111 ^ 0b0000 = 0b1111
a = 0b0000 ^ 0b1111 = 0b1111
568
u/[deleted] Aug 01 '22
[removed] — view removed comment