I have this code:
char *name = \"George\" if(name == \"George\") printf(\"It\'s George\")
I thought that c strings could not be compare
This will fail, since you are comparing two different pointers of two separate strings. If this code still works, then this is a result of a heavy optimization of GCC, that keeps only one copy for size optimization.
Use strcmp(). Link.
strcmp()