• SpaceNoodle@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months 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.