Even with int foo(char str[]);
which will take in an array initialized to a string literal sizeof doesn't work. I was asked to do something like strlen and the approach I want to take is to use sizeof on the whole string then subtract accordingly depending on a certain uncommon token. Cuts some operations than simply counting through everything.
So yea, I tried using the dereferencing operator on the array(and pointer too, tried it) but I end up getting only the first array element.
How can I sizeof passed arguments. I suppose passing by value might work but I don't really know if that's at all possible with strings.