Add this line before main function:
void swapCase (char* name);
int main()
{
...
swapCase(name); // swapCase prototype should be known at this point
...
}
This is called forward declaration: compiler needs to know function prototype when function call is compiled.