//有一个字符数组的内容为:"studentaami",请你将数组的内容改为"iamastudent".//要求://不能使用库函数。只能开辟有限个空间(空间个数和字符串的长度无关)。//#include<stdio.h>#include<string.h>voidfanw(char*left,char*right)//把每个单词单词翻转{char*pleft=left;char*pright=right;chartemp;while(pleft<pright){temp=*pleft;*pleft=*pright;*pright=temp;pleft++;pright--;}}voidfans(char*p)//把翻转后的单词再翻转{while(*p!='\0'){char*pst=p;while(*p!='\0'&&*p!=''){p++;}fanw(pst,p-1);p++;}}intmain(){charp[30]="studentaami";intlen=strlen(p);printf("原字符串为:%s\n",p);printf("翻转后的字符串为:");fanw(p,p+len-1);fans(p);printf("%s\n",p);return0;}