0
What is the error in the function?
I have created a function that swaps the cases of english letters. when used directly, there is no error but there is error if it is used as a function. Why? https://code.sololearn.com/coVOcF7YOYzR/?ref=app
3 Réponses
+ 4
int lower(char a);
int upper(char A);
char to_upper(char c);
char to_lower(char C);
void swapCase(char str[]);
define em at the top to make compiler happy :)
+ 3
😁nope..
Thats how c world works..
you need to define your function before using it (although not necessarily ... but it saves you from getting these errs)
.... or just change the order since lower() and upper() functions doesn't make use of any other functions you can move em at top...
PS: Harsha S
https://code.sololearn.com/cmnSg7F5Cyl8/?ref=app
+ 2
Prashanth Kumar isn't there any other way because i want to be more happy than the compiler