There is nothing to force you to write a main program
on each file; just as I supplied "getnum" on a separate file,
you can put different routines on different files. Write
a function "length(s)" which if given a character array argument
"s" returns the length of that string.
Put this on a file names "length.c", and leave
the object file in "length.o".
Write the main program for
testing this somewhere else. Type "ready" when you have compiled
and tested your program and are happy with it.
This file contains several lines of quite different lengths.
printf("%d\n", length(s));