Do you have to know the PARTICULAR computers hardware for C programming?

The memory allocation issue has been thoroughly addressed.

In the context of game dev, though (based on OP’s other post), you might also have to target specific hardware for low-level optimizations. Examples include graphics cards and their shaders, or at least a specific API level that they support (DirectX/OpenGL/Vulkan/etc.). You might also have to deal with sound card differences or CPU quirks, especially if you want to target older CPUs and their extended instruction sets.

For example, here’s the C source code to Quake 3 Arena, with some platform-specific optimizations for Win2k gamma and Linux netcode