answersLogoWhite

0


Best Answer

Macros, which are special lines/fragments of code, differ from any other code written in the source files in the aspect that it's not passed to the compiler (either for the purpose of encoding into machine instructions, or some intermediate form instructions). Instead, macros perform textual manipulations on the source code before passing it to the compiler, where this process preliminary to compiling the source files is called "preprocessing", and the software component responsible of doing it is called the "preprocessor"

Preprocessors, statements that tell the programming language (c or c plus plus) to perform such task as combining source program files prior to compilation.

by Abrar .s. Hussain

email for correction: hussainabrar46@gmail.com

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

A macro processor is a program that copies a stream of text from one place to another, making a systematic set of replacements as it does so. Macro processors are often embedded in other programs, such as assemblers and compilers. Sometimes they are standalone programs that can be used to process any kind of text.

Macro processors have been used for language expansion, for systematic text replacements that require decision making, and for text reformatting.


A preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers. The amount and kind of processing done depends on the nature of the preprocessor; some preprocessors are only capable of performing relatively simple textual substitutions and macro expansions

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between preprocessor and macros?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is macro a recursive function?

If you're asking if the c preprocessor supports recursive macros, the answer is no. The preprocessor is single-pass and since the "function" must be defined before it can be referenced, it can not be recursive.


What is the difference between macros and wizard?

a wizard inserts fields and a macros is something like a hyperlink that when you click on it, it automatically takes you to another page!


What is the difference between the header file and the preprocessor directive in programming language cpp?

pata nhn


What is the difference between pause recording and stop recording option in macros submenu in windows word 2010?

no difference,..


What is the difference between preprocessor directives and header files?

Preprocessor: All the preprocessor commands written in a high level language are processed by the preprocessor before compiler takes over.Example: "#define MAX_ROWS 10"Preprocessor finds all the places and replaces MAX_ROWS with 10 in the files of the project.Compiler: This software, converts the code written in high-level language into object file. Compiler converts all the files of a given project at once.


How does c plus plus code compiled?

When you invoke the compiler, the preprocessor (also known as the precompiler) runs first to process all the precompiler directives and macros; the lines beginning with the pound symbol (#) such as #define and #include. The preprocessor also strips out all of the comments. The preprocessor achieves this by creating one or more temporary, intermediate files containing nothing but C++ code. The compiler then compiles these intermediate files into object code which the linker uses to create the final executable.


What is the difference between an enumeration and macro?

In enumeration, values can be generated for us but in macros we have to give value for every macro template and type checking can be done in enums.


What is a preprocessor in PHP?

As it is, PHP does not have a preprocessor; it is a preprocessor that processes form variables and other environmental variables and prints HTML or general text.


Can you leave blank lines between macros in a macro group?

No, because Access will interpret a blank line as no further action and stop executing the macros.


What is the difference between macros in Microsoft Word and Microsoft Excel?

Not much, except that the macros would be written to perform different tasks, because Word (word processor) and Excel (spreadsheet) have different functions. Both are written by the user to perform a specific task, but since each application handles most tasks differently, the macros would need to be designed for the tasks relevant to the specific application.


Why all preprocessor directives starts with hashmark?

Because otherwise the preprocessor would ignore them.


What is Hypertext Preprocessor related too?

Hypertext Preprocessor is PHP, it is a server side web programming language.