EmbLogic's Blog

what is a compiler

what is the difference between compiler and assembler?

2 Responses to what is a compiler

  1. chetan.malik says:

    Compiler converts source code in high level language(.c format) to an executable machine code(.elf format).

    Assembler on the other hand converts low level language like assembly language code to a object code(.out format)which needs to be linked by a linker for generating machine code(.so format).

  2. Compiler is used to high level language (.c ) file to .s file which is low level assembly language file (.s format)
    use command

    #gcc -S hello.c //to get hello.s file

    In case of assembler this assembly language (.s) file will be converted into object file (.o) .
    use command

    #gcc -c hello.c // to get hello.o file

    compiler and assembler are used to perform 2 steps of compilation Process .

Leave a Reply to Vaibhav Singh Cancel reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>