Why does the arrow (->) operator in C exist?

Lobsters Hottest News

Summary

An article explaining the historical and technical reasons for the existence of the arrow operator (->) in the C programming language.

<p><a href="https://lobste.rs/s/garq37/why_does_arrow_operator_c_exist">Comments</a></p>
Original Article

Similar Articles

Getting silly with C, part &((int*)-8)[3]

Lobsters Hottest

A humorous educational article covering C programming fundamentals such as forward declarations, operator precedence, unconditional jumps, and basic arithmetic with intentionally silly code examples.

Curly braces: An evolution of Unix and C

Hacker News Top

A detailed exploration of how curly braces were typed on early Unix systems with Teletype Model 33, covering ASCII 1963, trigraphs, digraphs, and terminal driver translations.

Discussion about C array type semantics

Lobsters Hottest

The article explains the confusing behavior of C array types, including their decay to pointers, exceptions like sizeof and function parameters, and compares it to function types, suggesting a mental model where arrays and pointers are strictly separated.

Int a = 5; a = a++ + ++a; a =? (2011)

Hacker News Top

Analyzes the undefined behavior of the C/C++ expression 'a = a++ + ++a;' for int a=5, demonstrating three possible results (11, 12, 13) due to compiler-dependent evaluation order and post-increment handling, with theoretical and experimental breakdown.