I have a question. If:
works, why doesn'tCode:char s="abc";
work. My line of thinking is that they both initilize an array of a certain size and then put the string "abc" in it. What am I missing? Ill get a "parse error before ']' token" in the second code on line 2.Code:char s; s="abc";
The reason I would want the second alternative is lets say I have conditions with which I want to apply to s. Depending on the condition it will house a different string(none of which are longer than the array, including \0 of course), I would then want to print s. How would I get something like that to work?