If each lemmy instance has only a partial dataset
You can stop saying if. It is nearly certain that any instance only has a partial dataset in the same way that a search engine only indexes a partial dataset of every web page.
If this is the case: what happens if a bad actor subscribes to all communities of all servers?
There are bots that were built to do exactly that. I wouldn’t call them bad actors unless the instance owner prohibited such actions.
If you unselect the “frequently used in CS50” selection, the CS50 Manual pages for the C standard library, the C POSIX library, and the CS50 Library is a great digital and searchable reference for the C Programming language.
Might be a bit different than what you’re looking for but outside of printed books, it seems to be the most complete resource for C. And the CS50 Library, though not standard, is a well written extension to the standard library which may be helpful for common use cases.