Define the c preprocessor, C/C++ Programming

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.




Pre-process text for input to the compiler


Compile pre-processed text into intermediate code

Code generator

Generate assembler code for a target machine


Compile assembler code into object modules


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.

Posted Date: 6/14/2013 2:02:03 AM | Location : United States

Related Discussions:- Define the c preprocessor, Assignment Help, Ask Question on Define the c preprocessor, Get Answer, Expert's Help, Define the c preprocessor Discussions

Write discussion on Define the c preprocessor
Your posts are moderated
Related Questions
what is the syntax to get a coloured output.

Most first graders know that nine hundred and ninety nine plus one is one thousand, but C++ doesn't! Sure, a computer can easily compute 999 + 1 and get 1000. But reading and writi

THIS PROGRAM IS TO MULTIPLY THE TWO COMPLEX NO.S GIVEN BY THE USER #include #include #include struct complex     {     int real;     int imag;     }; void main()  {  clrs

program for singly linked list with out header

Write a program that finds the minimum total number of shelv, C/C++ Programming

Program is to store marks and name, roll no in a file: class stud   {     int rno;     char name[20];     int m1,m2,m3;     public:                 void acce

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

I have an exercise with 2 problems. One that is partially completed except with read problems with memory overwrite, and the other problem. I have enclosed the instructions documen

Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

create two array names and grade .in first array you have to store thease 10 names 1.a,2.3.r,4.s,5.l,6.k,7.n,8.b,9.z,10.d you have to enter grades for thease students.te program mu