更新了文件名。开始了数据结构

This commit is contained in:
lzy
2024-04-14 06:55:53 +08:00
parent 9bc7edbf47
commit 45bcb90c6d
69 changed files with 455 additions and 0 deletions

57
Chapter08/typedef.c Normal file
View File

@@ -0,0 +1,57 @@
#include <stdio.h>
#include <stdlib.h>
// #define INT int;
typedef int INT;
/**
* #define IP int *;
* IP p,q; -> int *p, q;
*
* typedef int *IP;
* IP p,q; -> int *p, *q;
*
*/
/**
* typedef int ARR[6]; --> int [6] -> ARR
*
* ARR a; -> int a[6];
*
*/
#if 0
typedef struct node_st
{
int i;
float p;
} NODE, *NODEP;
NODE a; // struct node_st a;
NODE *p;
NODEP p; // struct node_st *p;
#endif
/**
* typedef int FUNC(int); --> int(int) FUNC;
* FUNC f; --> int f(int);
*
* typedef int *FUNCP(int);
* FUNCP p; --> int *p(int);
*
* typedef int *(*FUNCP)(int);
* FUNCP p; --> int *(*p)(int);
*
*/
int main()
{
INT i = 100; // int i;
printf("%d\n", i);
exit(0);
}