I've heard of an exponential entity expansion attack, where macros are used to repeatedly replace an expression with copies of itself, for example 10 layers of 10 duplication. The example provided on the wikipedia page is as follows:
]>
&lol9;
I've been learning c recently, and am trying to understand how #defines work. Is it possible to accomplish the same recursive, potentially computer-crashing, result using #defines, but I've been told that:
#define a bbbbbbbbbb
#define b cccccccccc
#define c dddddddddd
#define d eeeeeeeeee
#define e ffffffffff
#define f gggggggggg
#define g hhhhhhhhhh
#define h iiiiiiiiii
#define i jjjjjjjjjj
#define j kkkkkkkkkk
#define k llllllllll
#define l mmmmmmmmmm
char a = 'z';
will only result in a variable named bbbbbbbbbb. Is it impossible to accomplish an outcome like the one described above using only #defines? If it's relevant (and doesn't merit a separate question and answer), is the answer different for c++?