TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: A game for learning C operator precedence

7 pointsby hlandauabout 3 years ago

3 comments

mmastracabout 3 years ago
I think this is a cool idea, but I wonder if it might be more effective to learn which parenthesis you can remove. I wasn't entirely clear on how many I should be adding and had to look at the console to figure out why it wasn't accepted.
edflsafoiewqabout 3 years ago
I&#x27;d rather give it the expression and it gives <i>me</i> the parenthesized form.<p>I&#x27;ve always thought &lt;&lt; and &gt;&gt; should have precedence close to * and &#x2F;, since they just multiply and divide by powers of two.
wruzaabout 3 years ago
I believe this game is NSFW for most C jobs out there.<p>Also:<p><pre><code> a &lt;= b &lt;= -c (a &lt;= b) &lt;= -c </code></pre> Invalid answer. &lt;= has LTR associativity, what’s wrong? (Apparently it requires “… (-c)”, my bad).