Define the c preprocessor, C/C++ Programming

Assignment Help:

Define the C Preprocessor?

Preprocessor' is a translation stage that is applied to your source code before the compiler proper gets its hands on it usually the preprocessor performs textual substitutions on your source code.

Module

Purpose

Pre-processor

Pre-process text for input to the compiler

Compiler

Compile pre-processed text into intermediate code

Code generator

Generate assembler code for a target machine

Assembler

Compile assembler code into object modules

Linker

Link object modules into executable code

1193_C Preprocessor.png

The pre-processor basically processes text; it knows virtually nothing about C syntax. It scans the input program text look for the directives in which the first character on a line is a '#'. While it convenes these directives, it takes certain actions including other files to be processed defining symbols, and so on it acts completely on the program text and will happily pre-process text which may be complete gibberish for the C compiler. This pre-processed text is after that passed on to the C compiler itself which checks the C syntax and if it consumes it, likes it, translating it into some intermediate code which is output, ready for input to the next phase.


Related Discussions:- Define the c preprocessor

Algorithm, Algorithm for railway ticket booking process

Algorithm for railway ticket booking process

How does free know the size of memory to be deleted.?, How does free know t...

How does free know the size of memory to be deleted.? int *i = (int *)malloc(12); followed by free(i); how did free function call know how much of memory to delete? A: It bas

What is the employ of ''using'' declaration?, A: A using declaration makes ...

A: A using declaration makes it possible to employ a name from a namespace without the scope operator.

What is the use of default constructor, What is the use of default construc...

What is the use of default constructor? - It's a constructor that doesn't accept any parameters. - If there is no user-defined constructor for a class, compiler declares a d

Why should i employ new instead of truthful old malloc()?, Why should I emp...

Why should I employ new instead of truthful old malloc()? A: Constructors/destructors, type safety, overridability. Constructors/destructors: unlike malloc(sizeof(Fred)), new

Program is to define a class as teacher, Program is to define a class as te...

Program is to define a class as teacher: Program is to define a class as teacher and collect information about them by using classes and object class teacher   {   pr

What are the benefits of using friend classes, What are the benefits of usi...

What are the benefits of using friend classes? - Friend classes are useful when a class wants to hide features from users which are required only by another, tightly coupled cl

Decode the code, smugglers are becoming very smart day by day. Now they hav...

smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Program for metric conversions, Write a program called Converter that does ...

Write a program called Converter that does three types of metric conversions. Your program should prompt the user for the selection conversion, prompt for input data, and display t

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd