c – Is it a bad practice to include the stdlib header file from a header file that matches the source file that needs this stdlib header?

The rule is: Each header file should be able to be compiled independently. If you have a file myheader.h, then a source file with a single line #include "myheader.h" should compile.

If your header file is not compiled without adding another header file, insert that other header file. However, there are cases where the problem is solved by using a forward declaration such as "class otherclass;" can be corrected. In this case, this is very preferable.

So DO NOT include header files with no need and avoid the need if you can.

Why not include other header files that are only used by the source file? Because your header file should be shared with other files. It should contain things that you want to share. Why should you provide internal details of your source files? Which header does it need? You should share as little as possible.