Passing string to a function in C – with or without pointers?
The accepted convention of passing C-strings to functions is to use a pointer: When the function modifies the string you should also pass in the length: Your first example: passes an array of pointers to strings which is not what you need at all. Your second example: passes an array of chars. The size of … Read more