When you include a header file like sys/stat.h you can use the functions
like stat. But where is the function body? I didnt write the body, yet it still does something.

But where is the function body?

In an object library somewhere, either statically or dynamically linked to your code when you build. Many libraries are linked for you by default, such as the standard C library and common POSIX libraries (which includes the things declared in sys/stat.h). Others will need to be linked explicitly in your build command or make file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.