Actually computer is a dumb machine. It doesn’t know anything except 0,1.when we made a program we actually make software. A nd that is our exe file after compilation with a long process.
you think that gives output in a fraction of second but it comes after four major steps that we will discuss in this blog for you.
Did you notice when you make a program it has also a filename.exe file. Computer can read the exe file only. it doesn’t have a knowledge about the filename.cpp and filename.obj file.
So in that case we need the compiler to to make a program executable.
Execution of a program involves 4 steps using the compiling tool, these tools are also set of programs which helps to complete the program executable.
There are 4 basic steps of compilations:
1.preprocessor:It process the program before compilation what preprocessor do that the library files what we attached with the code reads those library by #.
2.compiler: after preprocessing the source code, it pass the program to the compiler to check the errors in the program and create an object file of this program.
3.linker:In this stage linker links with the other object files or libraries and it generate the executable file.
4.Loader: it load the executable file into main memory and helps the compiler to run the program.
you can use many compiler like VS CODE,CODE BLOCKS and so many but they process with the same algorithm of compilation.so before start you programming journey have a look how a compiler compile a program.
and after that before dive in to programming first check out the libraries depending upon the languages.
everyone ask what programming we should learn first?
i recommended you as a guider that any programming you can choose if you are run out from syntax then you can choose python and if you are not aware of syntax and all then you should start c,c++ because c++ gives you lots of things the barriers of c has executed by c++ the cons has reduce and make it more fruitful to use the concepts of object oriented (oops) gives you c++.
if you think c++ is the first who comes up with the oops concept then you are wrong first oops concepts programming is simula67 .
thanks for your valuable time get in touch we will come up with soem new facts and old concepts in a new way.
facebook page link: