this post was submitted on 05 Aug 2024
261 points (94.2% liked)

Programmer Humor

19187 readers
1305 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
261
Do you know who can help? (programming.dev)
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]
 
you are viewing a single comment's thread
view the rest of the comments
[–] SpaceNoodle 4 points 1 month ago

Arrays may be implemented as pointers on C, but the distinction is on how they are used, which is why I used the verbiage I did.

What if you need to modify a reference to a pointer, e.g. change the value of a value referencing a certain place in an array? strtol(), for example, uses a pointer to a pointer to a char to indicate the end of the parsed portion of the input string.

Major codebases performing high-level operations on data that's shared in barely trackable scopes certainly aren't best implemented in C. It's still the language of choice for low-level code, especially on embedded systems, where allocations are not taken lightly.