Programming Language, Compiler and Interpreter

Programming Language, Compiler and Interpreter


Hey guys! This is Priyank and this is my
first tutorial on computer programming and in this tutorial we are going to
learn about Programming Language Compilers and Interpreters. So let’s
start with computer programming language like in our daily life
we need some language to communicate with each other, like here I am talking
in English so English is the medium of communication likewise we need some
language to communicate with our computer. Since our computer do not
understand English or any other language so we need some different
language to communicate with our computer
that languages we termed as programming languages. Some of the most common
programming languages are C, C++, Java, Python etc. These are some of the most
common programming languages. Okay let’s see on Wikipedia what it says about
programming language so according to wikipedia a programming language is a
formal language which comprises a set of instructions that produce various kinds
of output it means we will give some instructions to a computer and then
accordingly it will produce some output then programming languages are used in
computer programming to implement algorithms what are algorithms we will
talk about them later for now we know programming languages is the language which
consists of instructions that produce various kinds of output accordingly and
if you want to read more about programming language then you can read
on Wikipedia I will give the link in description you can see. Now let’s talk
about compilers. So what are compilers? A compiler is a computer program that
translates computer code written in one language into another language
what does it mean? Hmm… okay first see this You can see this code. This is a code
written in C++ computer programming language, but you can see I am using
English words here the ‘Enter Word to Replace’, ‘cout’, ‘gets’ all these are English
words but our computer do not know English. So how our computer will know that what to do with these instructions? So here comes the compiler. A compiler converts this code, I wrote into a lower
level language. What is a low level language? A low level language is that language that could be understood by a computer. So the compiler first convert
this code into a lower level language then creates an executable file
so our computer can execute those instructions like here see, ‘The name
compiler is primarily used for programs that translates course code from a high level
programming language to a lower level language’. In high level programming
language we use English words or simple grammar. That’s it. This is What is a Compiler? If you wanna read more then you can check here. Now let’s
talk about interpreters, interpreter is little bit different from compilers. A
compiler first reads the whole code checks whether if there is an
error or not if there is an error it will give us a message that there is an
error in your program please change then try to run again, but an interpreter does not
work like that. An interpreter reads the code line by line it means it reads the
line of code then gives some output then read the second line of code then gives
some output so this is interpreter this is how interpreter works we will
get to know about them later but for now this is enough and okay let’s talk about
the stages or steps taken while compiling a program so these steps are
not gonna understood by you for now but but let’s see what are these steps so
here are the steps first step is the pre-processing in this step it includes
all the header files included in our program they’d be termed as preprocessor
commands and then second step is the compilation. In the process of
compilation it converts our source code into assembly code
and then that assemble code gets converted into a machine code and then
that machine code gets linked with our static libraries or library functions
and then after that it converts into a executable file that we will run to
check our output so this is it for now and we will learn about the installation
of compilers in a PC in the next video so thank you guys for watching this
video

Leave a Reply

Your email address will not be published. Required fields are marked *