— Asm style :)but yes it's not needed in C++, compiler is smart enough
— Never done asm. The compiler is smart enough, but I don't and is more difficult to read to me.
— No, I meant you're right
— Can't you move 0 in a reg in asm? Why xor?
You can, but it some cases xor the register with itself is considered faster, I don't remember detailshttps://stackoverflow.com/questions/1396527/what-is-the-purpose-of-xoring-a-register-with-itself
— It's creting issues
— /warn read the rules
— That's 2/2 warnings; kaushik is out!Reasons:1: read the rules2: read the rules
— It requires less bytes in asm
— Not sure if it's ub, but looks awful
— It's not UB but it's awful, yes
— Haxor tricks doomed you. At the end of main's while you do n = 0, so n != 4 is always true
n = 0
n != 4