5 comments

[ 2.8 ms ] story [ 24.4 ms ] thread
Also, the sizeof operator and the ! (not) operator.
> Unsigned Right Shift (>>>).

C doesn’t have this.

Right. 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.

The expression

  int a, b, c;
is not a use of the comma operator. This is using a comma as a separator, like in a function call.

The purpose of the comma operator is to add a sequence point between its left hand side and right hand side. The return value of the left hand side expression is discarded and the entire expression evaluates to the right hand side's value and type.

I'm sorry, this is just some SEO spam. When writing about C, you better be precise.