Is it possible to get the
struct info (that is, the keys) of any struct? Or is required that you go to the manual page to read up what the actual structure is for that object. Take the following example:
struct stat stats; stat(filepath, &stats); printf("Size: %lld\n", stats.st_size);
Is it possible to do something like
stats.keys(), or whatever a potentially equivalent operation would be to see the inner structure of a
You can read the man page, or you can read the header; there is no built-in introspection facilities in the C language.
In theory, if you compile the executable with debugging symbols a debugger might be able to tell you some of this (after loading and parsing the executable and its symbols), but that's generally going to be less convenient than just reading the docs.