I'm reading a book on C and it's telling me how to use gcc and about the -c option/flag. It reads "-c Compiles to an object (.o) file instead of an executable. This is important for creating library files." What is an object file and how is this good for library files? I'm assuming this is for creating files that don't have a main function and are used only as a resource for other programs. Is my understanding correct? If so could someone give me a 2 very simple(hello world simple) code examples of a program that uses a custom object or library file. Thanks.