How do I know if a C program will written on Linux will work elsewhere

Viewed 160

I need you to explain me how do I know if my C program will work for example on Windows if I write it on Linux and it works on that Linux and vice-versa (program written in Windows)

Also what standards do I have to follow to write programs that will run on different operating systems? How do I detect whether functions from libraries or whole libraries will work on different operating systems?

For example I have functions fread, fwrite, fopen, fclosefrom library stdio.h - how do I know if I can work with them properly on other systems than Linux? Same with functions that work with file descriptors: open, creat, close, read, write from libraries: sys/types.h, sys/stat.h, fcntl.h.

1 Answers
Related