3 ms·
> Unsigned Right Shift (>>>). C doesn’t have this.
by tirrex 6y ago
> Unsigned Right Shift (>>>).
C doesn’t have this.
- simias 6y agoRight. C decides if a shift is logical or arithmetic based on the type of the operands (signed or unsigned). Also `-` is not a decrement operator, that's obviously `--`, `-` is just used to change the sign of a variable. Honestly I find the format of the article a bit odd, in a C tutorial I think it makes more sense to bring up operators progressively when they become needed. Bitwise arithmetic and bitshifts can often be left for later for instance. It seems more engineered towards getting search engine clicks than being a good resource for people learning C. Also as far as I can tell there's no mention of operator precedence, which is probably one of the trickiest things with C operators given that it's sometimes not what you'd intuit.