I have gotten rid or the pointers as mentioned by Zuzah in favour of an array. I have changed the void to char and now I get 2 compiler errors
Code:
In function `convert':|
initialization makes integer from pointer without a cast|
passing arg 1 of `toupper' makes integer from pointer without a cast|
Im still none the wiser?
Code:
char convert (char ch1[]);
int main() {
char str[10];
printf("Enter a word: ");
fgets(str,10,stdin);
convert (str);
printf("Converted to: %s",str);
return 0;
}
char convert (char ch1[])
{
char ch = ch1;
ch = toupper(ch1);
return ch;
}