I assign two different pointers with the same content(not value!) to strings and when I print they address I saw they have the same adders and the none pointer string has different adders, can someone explain why is it happening? Someone told me it had something to do with string literals, but I don't sure.
char* str1 = "hello";
char* str2 = "hello";
char str3[8] = "hello";
printf("%p %p %p", str1, str2, str3);
output:
0x01077B30
0x01077B30
0x0107F6E8