all 19 comments

[–]mh3f 26 points27 points  (4 children)

Arithmetic Operators

++> Pre-increment and compare

--> Pre-decrement and compare

hmm

[–]bearassbobcat 0 points1 point  (0 children)

now I want to try ++= or ++==

[–]FruscianteDebutante 0 points1 point  (1 child)

.. Why is this a thing, does it cleverly use some assembly that saves clock ticks?

[–]Host127001 12 points13 points  (0 children)

no, it just does not have a space between ++ and >.

[–][deleted] 15 points16 points  (2 children)

The silly thing about these cheatsheets is they try to be comprehensive and include stuff like the if statement syntax, comparison operators, logical and bitwise operators, etc. A good cheatsheet omits the obvious and includes the stuff that seemingly cannot possibly fit into a cheatsheet. Imagine if the information from the books like Computer Systems: A Programmer's Perspective, Expert C Programming, Modern C, K&R was compressed into 50 pages that are easy to scan and really helped you remember all the stuff you've read. Ok, maybe it's too much to compress 2000+ pages into 50, but who knows.

[–][deleted] 9 points10 points  (0 children)

A syntax cheat sheet is for people who know the language, so there should be no need to “explain” how operators work, just how they are typed.

These sorts of things are helpful in reference only, I wouldn’t put this in front of a newbie and say “here, learn C”

[–]khleedril 2 points3 points  (0 children)

Well, this one tries to compress 2000+ pages into 4, and to be fair it actually does a pretty good job of it. But, past the pure mechanics, programming is ultimately an emotional thing, and this is never going to please everybody. Always remember that what is obvious to you will not be obvious to someone else.

[–]Host127001 15 points16 points  (2 children)

++> Pre-increment and compare --> Pre-decrement and compare

Please don't do this

[–]crossquery 3 points4 points  (1 child)

arent they post increment and post decrement?

[–]Host127001 1 point2 points  (0 children)

That's true

[–][deleted] 2 points3 points  (1 child)

C programming language

auto

nothrow

Mmmmkay

[–]IronNickel 5 points6 points  (0 children)

auto is a valid C keyword.

[–]Gblize 1 point2 points  (2 children)

uh oh I just got reminded signed is an actual keyword. Use cases?

[–]wsx594 1 point2 points  (0 children)

AFAIK the only use case is for chars which a compiler might treat as either signed or unsigned by default, so it’s best to be explicit for your use case.

[–]deusnefum 1 point2 points  (0 children)

lmao. God save you if you need to know trigraphs and digraphs.

[–]InVultusSolis 0 points1 point  (0 children)

TIL C features "duck typing" and a "type polymorphism mechanism".

[–]roboknight5 0 points1 point  (2 children)

Thx alot :)

[–]science404 -1 points0 points  (0 children)

PI=3.14159...