difference fixed width strings and zero-terminated strings
- by robUK
Hello,
gcc 4.4.4 c89
I got into a recent discussion about "fixed width strings" and "zero terminated strings".
When I think about this. They seem to be the same thing. A string with a terminating null.
i.e.
char *name = "Joe bloggs";
Is a fixed width string that cannot be changed. And also has a terminating null.
Also in the discussion I was told that strncpy should never been used on 'zero terminated strings'.
Many thanks for any susgestions,