Skip to main content

Timeline for Tips for golfing in C

Current License: CC BY-SA 4.0

4 events
when toggle format what by license comment
Sep 14 at 14:48 comment added tomasz I'm neither golfer nor a programmer, basically came here by accident, but wow, this is just... so wrong...
Apr 12, 2023 at 2:23 comment added ShadowRanger Another case where I've used this: I had a loop using pointer arithmetic to iterate over argv (named v for brevity), and I only needed the second character of each argv string. The original code used v[0][2] for this (the pointer arithmetic moved v so v[0] was always the current string). Indexing being higher precedence than dereferencing meant *v[2] wasn't an option (it would be (*v)[2], which saves nothing), but 2[*v] worked perfectly and saved two characters while behaving identically to v[0][2].
Jul 29, 2021 at 0:58 history edited Bubbler CC BY-SA 4.0
added 80 characters in body
Jul 29, 2021 at 0:34 history answered Bubbler CC BY-SA 4.0