warning: assignment makes integer from pointer without a cast
Assigning a value of one type to a variable of an incompatible type.
int main() {
int x;
char *str = "Hello";
x = str;
return 0;
}Use proper casting or change the variable type to match the assigned value.
int main() {
char *str = "Hello";
char *x = str; // Changed x to char*
// OR if you want the address as an integer:
// unsigned long x = (unsigned long)str;
return 0;
}