1 votes 1 votes Consider the definition of macro $B,$ nested within the definition of a macro $A.$ Can a call to macro $B$ also appear within macro $A?$ If not, why not? If yes, explain if there are any restrictions. Compiler Design gate1989 descriptive compiler-design macros unsolved + – makhdoom ghaya asked Nov 30, 2016 edited Apr 16, 2021 by Lakshman Bhaiya makhdoom ghaya 725 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes a call to macro B can appear within macro A. This is a common practice in macro programming and is known as nested or recursive macros. Here's a simple example in C-style preprocessor directives to illustrate: #define B() printf("Hello from B!\n") #define A() { printf("Hello from A!\n"); B(); } int main() { A(); // This will expand to printf("Hello from A!\n"); printf("Hello from B!\n"); return 0; } rajveer43 answered Dec 29, 2023 rajveer43 comment Share Follow See all 0 reply Please log in or register to add a comment.