Write a C program for implementing Macro Processor

By | December 3, 2016

C program for Macro Processor


Write a C program for Macro Processor. Here’s a Simple Program implementation of Macro processor in C Programming Language.

We know that Macro is a single line abbreviation for a group of statements. We should define that sentence – cluster before using them in actual program.

Macro processor will analyse the program and on encountering  macro variable, it will replace that ‘Macro invocation’ to corresponding Macro definition.

It should also take care the number  and position of arguments used in Macro invocation.


ALGORITHM:


  • STEP 1: Start the program execution.
  • STEP 2: Macro instructions are included in a separate file.
  • STEP 3: The instructions with ‘macro’,’mend’,’call’ on them should not be printed in the output.
  • STEP 4: Print all other instructions such as start,load,store,add,sub etc with their values.
  • STEP 5: Stop the program execution.

Below is the source code for C program for Macro Processor which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :



OUTPUT : :



If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach upto you in the short interval.


Thanks for reading the post.

One thought on “Write a C program for implementing Macro Processor

  1. Pingback: Write a C program to design flying characters Screen Saver

Leave a Reply