#include <stdio.h>
void main()
{
char s[100];
int c=0;
printf("請輸入一個字串:");
scanf(“%s”,s);
while(s[++c]!='\0');
printf("此字串長度為:%d\n", c);
printf("其反向字串為:");
while(--c>=0)
printf(“%c”, s[c]);
}
--
◎ [1;31m龍 [32m貓 [33m資 [34m訊 [35m天 [36m地 [0m( [1mbbs.mgt.ncu.edu.tw [0m)
◎[ [1;33;46mbrucetsao [0m]From: 140.115.82.88