Hi there,
Here is the prototype for the myConcat function which takes a variable number of arguments. I am to create a file that contains a definition of the myConcat function.
char* myConcat\(int n, ... \)
When the function is called, the first argument should be an integer > 0.
The other arguments should all be of type char* and are expected to point to '\0'-terminated sequences of chars. The first argument indicates how many "string" arguments are passed. myConcat should return the concatenation of these strings.
Note that the file must not contain a main() function. The only names visible outside the file (when it is compiled together with other .c files) should be "myConcat".
How do I make sure that the proper arguments have been passed to myConcate? For example myConcate(3, "Hello", "There", "!") would be correct, but myConcate(3, "Hello", 5.0, "There") should generate some kind of error because 5.0 is not a pointer to char.
Also, is there anything I have to do to make sure that the only names visible outside the file should be "myConcat"?
Thanks to anyone whose able to give me some kind of hint!
Magda