I have an array that is a "NULL-terminated array of NULL-terminated strings". This is given by char **args.
I can access individual elements using args[0], args[1], etc. I wanted to take the entire array and flatten all the elements into a string. If the array contained:
args[0] = "abc"
args[1] = "def"
I want a resulting string to be:
abcdef
I tried to do this by looping through all the elements and concatenating them all together but I do not know how to tell when I have reached the end of the array because sizeof() does not work.