#include <stdio.h>
/* A recursive strlen */
int slen(char *s)
{
return (*s) == '\0'? 0 : slen(s++) + 1;
}
int main()
printf("strlen is %d\n", slen("abcdefg"));
P老師好久不見!
P老師好久不見!
回覆刪除