J
Jack
The following code can be compiled. But When I run it, it causes
"Segmentation fault".
int main(){
char **c1;
*c1 = "HOW"; // LINE1
++(*c1);
*c1 = "ARE";
++(*c1);
*c1 = "YOU";
}
c1 is a pointer-to-pointer to char. How to initialize c1 to three
strings: "HOW", "ARE", "YOU"?
Thanks a lot.
"Segmentation fault".
int main(){
char **c1;
*c1 = "HOW"; // LINE1
++(*c1);
*c1 = "ARE";
++(*c1);
*c1 = "YOU";
}
c1 is a pointer-to-pointer to char. How to initialize c1 to three
strings: "HOW", "ARE", "YOU"?
Thanks a lot.