3 ms·
>sizeof dst Note that this only works if dst is a stack allocated(in the same function) array and not a char *
by mtlmtlmtlmtl 4y ago
>sizeof dst
Note that this only works if dst is a stack allocated(in the same function) array and not a char *
- unwind 4y agoYes it should be read as a placeholder for whatever you need to do. Could be an array inside a struct too for instance, that is quite common.
- sedatk 4y ago> and always remember that "%s" part. Never put src there, of course > Note that this only works if dst is a stack allocated array Even this "ideal" solution is full of pitfalls. The state of memory safety is so sad in the world of C.