I'm in the most confusing period of learning the C language. What's worse is that my book keeps writing exercises using commands and method that have not been taught yet! Anyhow, could someone please try to explain WHY and WHEN a function would be declared like the following:
char * compare ( char * , char *);
I don't understand the asterisk before the function name. This is the function header:
char * compare ( chat *str1, char *str2 )
and it returns the following
if ( x > y )
return ( str1);
else if ( x < y )
As long as I didn't have the asterisk before the function name, I got tonnes of errors and warnings.
could someone please explain?