第五章完结

This commit is contained in:
lzy
2024-04-01 15:38:16 +08:00
parent bacc769f09
commit 1a690b5737
8 changed files with 720 additions and 8 deletions

28
Chapter5/char.c Normal file
View File

@@ -0,0 +1,28 @@
#include <stdio.h>
#include <stdlib.h>
// #define N 10
#define N 32
int main()
{
// char str[N] = {'a', 'b', 'c'};
char str[N] = "a";
scanf("%s", str);
// str数组名本身就是地址不需要&str
printf("%s", str);
// gets(str);
// puts(str);
// for (int i = 0; i < N; i++)
// {
// printf("%c ", str[i]);
// }
printf("\n");
exit(0);
}