【正文】
請(qǐng)編一個(gè)函數(shù)fun(char *s),函數(shù)的功能是把字符串中的內(nèi)容逆置。例如:字符串中原有的內(nèi)容為:abcdefg,則調(diào)用該函數(shù)后,串中的內(nèi)容為:gfedcba。 注意: 。 請(qǐng)勿改動(dòng)主函數(shù)main和其它函數(shù)中的任何內(nèi)容,僅在函數(shù)fun的花括號(hào)中填入你編寫的若干語句。include include include define N 81fun(char *s){ int i, j。 char t。 for (i=0,j=strlen(s)1。 ij。 i++,j) { t=s[i]。 s[i]=s[j]。 s[j]=t。 }}main(){ char a[N]。 printf(Enter a string: )。gets(a)。 printf(The original string is: )。puts(a)。 fun(a)。 printf(\n)。 printf(The string after modified: )。 puts(a)。 }請(qǐng)編一個(gè)函數(shù)fun(char *s),函數(shù)的功能是把字符串中所有的字符前移一個(gè)位置,串中的第一個(gè)字符移到最后。 例如:原有的字符串為:,則調(diào)用該函數(shù)后,串中的內(nèi)容為:。 注意:。 請(qǐng)勿改動(dòng)主函數(shù)main和其他函數(shù)中的任何內(nèi)容,僅在函數(shù)fun的花括號(hào)中填入你編寫的若干語句。 include include include define N 81fun(char