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 Imperialism?

Ans: Imperialism refers to the practice by which a powerful nation establishes political and economic control over another country. Britain ...