3 ms·
...you pass in a pointer to the first character. Arrays in C are simply contiguous spans of memory.
by kizer 8y ago
...you pass in a pointer to the first character. Arrays in C are simply contiguous spans of memory.
- fulafel 8y agoThid then has the problem that thr length is unknown, leading to well known problems.
- petee 8y agoWell if you wrote the array, or your program did, then you do know the length. Not a problem. Would it be nice if an array internally stored that? Sure. Does it? No. Is that a real problem? No, not really - its been solved and worked around for decades