qfedu-c-level/day6/d12.c

19 lines
370 B
C

#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;
}