Re: [C] String Problem?
hi,
In first statement you can intialising a string which is perfectly OK with the Compiler, where as the second statement is wrong and would most probably give the error of "Lvalue required..."
when we write x={"my"} ...Note that we are actually trying to overwirte the Base address of the character array x. Which is illegal.
The base address must be retained and can't be modified. Whereas i think
*x = "my"; should work with some compilers. try them out...
bye