Let me start by saying I am fairy new to C programming, but not programming in general.
Say you have the code below which defines a pointer to an array of chars (a string right? heh), and then you want to assign some text to that string. From the tutorials I have read, and the coding I have tried I know this works:
Code:
char *name;
name = "Reason58";
Now given that pointers are variables which store the memory address of other variables, why is the above code acceptable? Shouldn't it be:
Code:
char *name;
name = &"Reason58";
Or something similar? Sorry for the stupid question. I have pointers like 98% figured out, just wanted to clarify that.
Thanks.