What you mentioned is compatibility across platforms. A program written in C is also guaranteed to run on all the systems you mentioned, given that the system has a C compiler and libc that stick to the standard. You, the programmer, does not have to anything to “make sure” your program works.
We’ve invented high-level programming languages like C 53 years ago, just to get away from assembly, and to avoid dealing with the “cross-platform” problem you mentioned, remember?
What you mentioned is compatibility across platforms. A program written in C is also guaranteed to run on all the systems you mentioned, given that the system has a C compiler and libc that stick to the standard. You, the programmer, does not have to anything to “make sure” your program works.
See this insane list of platforms GCC supports.
https://en.wikipedia.org/wiki/GNU_Compiler_Collection#Architectures
We’ve invented high-level programming languages like C 53 years ago, just to get away from assembly, and to avoid dealing with the “cross-platform” problem you mentioned, remember?