下载后可任意编辑串的基本操作#include#include#include#define m 100typedef struct{char ch[m];int length;}Hstr;void main(){Hstr *l,*p,*r;char c,w;int h,j,k;int i=0;l=(Hstr *)malloc(sizeof(Hstr));p=(Hstr *)malloc(sizeof(Hstr));r=(Hstr *)malloc(sizeof(Hstr));l->length=0; p->length=0;r->length=0;printf("请选择相关操作(数字 1~5 控制,输入 0 结束)\n");printf("--------------1
建立串---------------\n");printf("--------------2
显示串长度-----------\n");printf("--------------3
生成与原来相同的串---\n");printf("--------------4
串比较---------------\n");printf("--------------5
串连接---------------\n");printf("--------------6
返回值---------------\n");scanf("%c",&w);getchar();while(w){switch(w){case '1':{printf("请输入字符(#结束):\n");scanf("%c",&c);while(c
='#'){ l->length++;l->ch[i]=c;i++;scanf("%c",&c);下载后可任意编辑}printf("串中字符为\n");for(i=0;ileng