Pages

Wednesday, June 5, 2024

MultiLine Macros in C

Macros can be single line as well as multiline

for example :

#define AddMacro(x,y) \
{\
    int total = x + y; \
    printf("%d",total); \
}

In the above example \ is used to tell the compiler to consider the below lines too
if \ is missing then only the first line will be considered as Macro.

No comments:

Post a Comment

What is anti- Debugging

  Anti- debugging is how we can stop somebody from debugging our system and getting all the information out of your subsystem.