线性表----数组
1.C语言表示
(1)字符串类型
#define MAXSIZE 100
typedef struct{
char a[MAXSIZE+1];
int n;
}sqlist;
(2)结构体表示!
#define MAXSIZE 100
struct student{
int num;
char name[20];
char sex;
int age;
float score;
};
typedef struct{
struct student s[maxsize];
int n;
}sqlit;
(3)计算元素的地址
公式:loc(a1)+(n-1)*len
例子: