用循環輸出字符串

#include<stdio.h>
include<string.h>
void print(char arr[])
{
int num = strlen(arr);
int end = num - 1;
for (int start = 0; start <= end; start++)
{
printf("%c\n", arr[start]);
}
}
int main()
{
char arr[] = "abcdefg";
print(arr);
return 0;ide

}string

相關文章
相關標籤/搜索