For example lets say I defined a constant as below using #define macro in C
#define MAXSIZE 10
Is there any function in C that I can invoke by passing 10 as input and retrieve that constant name "MAXSIZE". Thanks
For example lets say I defined a constant as below using #define macro in C
#define MAXSIZE 10
Is there any function in C that I can invoke by passing 10 as input and retrieve that constant name "MAXSIZE". Thanks
No for many reasons:
10
value?but the actual reason that kills it is:
MAXSIZE
by 10
before compiling, so this information is lostThe answer is no, the c preprocessor replaces all occurences of MAXSIZE with 10 when run.