字符串逐个输出
#include <stdio.h>
#include <string.h>
int main(void)
{
char a[100], temp;
int i = 0, j;
printf("inpur your words:");
while((temp = getchar()) != '\n') //判断字符串输入完毕
a[i++] = temp;
for(j=0; j<i; j++)
printf("%c\n", a[j]);
return 0;
}