字符串一般有两种赋值方式
在定义时赋值:
char*str="hello,world
使用strcpy(dst_str, src_str) 赋值:
char*str1="hello,world";charstr2[20];strcpy(str2,str1);
c语言没有字符串变量,可用gets函数获取字符串给数组
字符串的赋值用到指针,在switch的选择中带入字符串指针即可。
char ch;switch(ch){case '+': ...case '-':......}
采用字符串变量就可以的。