qfedu-c-level/day6/d12.c

19 lines
370 B
C
Raw Normal View History

2023-07-10 17:46:22 +08:00
#include <stdio.h>
int main()
{
char teacher[] = {'d', 'i', 's', 'e', 'n'};
printf("%s\n", teacher); // disen
int len = sizeof(teacher);
printf("%d\n", len); // 5
// for (int i = 0; i < len; i++)
// {
// printf("%c", teacher[i]);
// }
int i = 0;
while (i < len)
{
printf("%c", teacher[i++]);
}
return 0;
}