Check out example codes for "is c and c++ platform independent". It will help you in understanding the concepts better.
Code Example 1
In C, C++ the compiled code (compiler given code) is machine language code which is understandable only by the cureent operating system. Hence this compiled code can not be executed in another platform. Due to this reason these languages are considered as platform dependent programming languages.
Learn ReactJs, React Native from akashmittal.com