When we declare a variable as
char arr[] = "Hello";
then the string "Hello" above is located in stack.
But when we declare a variable as
char* arr = "Hello";
then the string "Hello" is declared in stack or code segment? If code segment then why code segment and not in stack?