I am not sure this is what you are looking for, but it might be.
From your title and the highlighted portion, I am assuming that you want to get rid of
int main() {}
and title it
void lower(char *s) {}
While you can easily do that with a copy paste, understand that this file can not be compiled on its own anymore. The C compiler will look for a
[return type] main() {}
to be the starting point for the program. With out this, there is no program.
I believe you are wanting to make a library and use the lower function in another program. To do this, I would create a .h file with the includes and function name:
void lower(char *s);
This can replace all of your other includes with a single include of this file:
#include "file.h"
You can use the above line in other programs to make this function available in these programs. If you have multiple functions in a library file and you do not want them all to be accessible outside of the file, ensure you use the 'static' keyword in front of methods you do not want available:
static int otherFunction();
Let us know if this is what you are looking for answer wise. If not, please try to clarify your request.