+ 5
Why does the following code work this way?
https://code.sololearn.com/c0arBA6nem4X/?ref=app Why is unknown replaced with "%s" and not as un"Sololearn"? Is there any order of precedence involved?
5 Réponses
+ 2
known and unknown are different macros.
i. e. different keywords
+ 2
code learner Yeah but the thing is that the detection of keyword isn't simply replacing a word by spaces
+ 1
Yeah, I think delimiters (like, token parsing) is taking precedence here.
Research area seems like "compiler design", but there may be an official name like...lexicon or lexical analysis or something.
Anyway, interesting question...I'm used to thinking about this in the "dev as consumer" way, and I think this is the type of question a compiler designer would be asking.
+ 1
I don't feel there is an order of precedence because when I switched the order of macro definitions I get the same output
0
It's blank.
#include <stdio.h>
int main() {
return 0;
}