Q1) Difference between Compiler and Interpreter

Screenshot 2026-02-12 at 4.35.29 PM.png

Q2) Difference between system software and application software

Screenshot 2026-02-12 at 4.34.16 PM.png

Q3) Explain all the software programs involved from writing the source program to the execution of the program

Q4) Explain all the features of Macros with example

A macro is a named block of instructions that is expanded inline during compilation or assembly. It helps automate repeated code and improves readability.

Macro Expansion

When a macro name is used, the macro processor replaces it with its actual body of instructions.

This happens before program execution. The code is copied wherever the macro is called, reducing typing and repeated coding.

Example:

#define SQR(x) ((x)*(x))
y = SQR(5);

Expands to:

y = ((5)*(5));

Code Reusability

A macro can be defined once and used many times in a program.

This avoids rewriting the same logic repeatedly and reduces programming effort.

Example:

#define PI 3.14
area = PI * r * r;
circumference = 2 * PI * r;