i want to know the rule behind the macro substitution

ex:
Code:
#include<stdio.h>
#define p P

int main()
{
int P = 10;

printf("\n P= %d",p);
}
o/p: P=10

my question is why dont macro substitution dont replace p in printf with P.