Computer Science, asked by hammadtahir003, 3 months ago

How a program, using C compiler, is executed on a host machine? Write down all phases.

Answers

Answered by malathisrirangam
10

Explanation:

How a program, using C compiler, is executed on a host machine? Write down all phases.

Answered by anjaliom1122
0

Answer:

Phases using C compiler, is executed on a host machine:

Preprocessor, Compiler, Assembler, Linker.

Explanation:

The C compiler compiles and converts the program to assembly code (low-level language).

  • Preprocessor

This source code is provided to the preprocessor first, and the preprocessor extends it. The enlarged code is handed to the compiler after it has been expanded.

  • Compiler

The preprocessor expands the code before passing it to the compiler. This code is converted to assembly code by the compiler.

  • Assembler

An assembler is used to convert assembly code to object code. The assembler generates an object file with the same name as the source file.

  • Linker

The majority of C programmes make use of library functions. The object code of these library files is stored with the '.lib' (or '.a') extension, and they are pre-compiled.

Similar questions