how can I differentiate program and source code
Source code and program
Program is a set of instructions that need to be executed by the computer
Source code is just text for the program that you write in the editor
Program = source code + variables + memory + stack + system resources + ports allocated etc