数据结构中有这样语句 L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思? 具数据结构中有这样语句L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思?具体的含义

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/05 22:20:27
数据结构中有这样语句 L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思? 具数据结构中有这样语句L->elem=(ElemType )malloc(LIST_INIT_SIZE*size       of(ElemType)); 这是什么意思?具体的含义

数据结构中有这样语句 L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思? 具数据结构中有这样语句L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思?具体的含义
数据结构中有这样语句 L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思? 具
数据结构中有这样语句
L->elem=(ElemType )malloc(LIST_INIT_SIZE*size
of(ElemType));
这是什么意思?
具体的含义

数据结构中有这样语句 L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思? 具数据结构中有这样语句L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思?具体的含义
分配一个存储容量的大小LIST_INIT_SIZE*size
of(ElemType)的存储空间.
L->elem指向这存储空间的首地址.
这是线性表的内容吧.
打个比方说:就是建造了一个数组,比如说啊a[10],但这个数组是空的,L->elem就是指向数组的首地址.

数据结构中有这样语句 L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思? 具数据结构中有这样语句L->elem=(ElemType )malloc(LIST_INIT_SIZE*size of(ElemType)); 这是什么意思?具体的含义 数据结构中,L.(*elem[i])=2;这样表达对吗?其中SqList L; 数据结构中q=&(L.elem[i-1])是什么意思? 数据结构中elem表示什么?尽量详细点,谢啦. 求一段数据结构算法分析 看不懂哇int LocateElem_Sq(SqList,ElemType e,Status(*compare)(ElemType,ElemType))i=1;p=L.elem;while(i 数据结构中if(!l. q=L.elem+L.length-1和q=&L.elem[L.length-1]为什么一样?L. l.elem是什么意思? q=L.elem+L.length; q指向顺序表尾 L.elem和L.length分别是什么东西 数据结构.线性插入问题.For(p=&(L.elem[L.length-1]);p>=q;——p)*(p+1)=*p;我怎么感觉——p.也可以写成p——;改了有影响吗? 数据结构:if(L.length>=listsize)这个语句该怎么理解啊如题 在数据结构中 LinkList *p=L->next;While(p! 线性表中元素后移,for(p=&(L.elem[L.length-1]); p>=q; --p)为什么是--p?而不是++p? 设顺序表L是一个递增有序表,阅读下列程序写出算法功能void demo1(SQLIST *L,int x){ int i;if (L->length>=listsize) return error;i=L->length-1;while(i>=0&&L->elem[i]>x){ L->elem[i+1]=L->elem[i]; i--; }L->elem[i+1]=x;L->length++;} 数据结构中的顺序表插入操作中if(iL->len+1)中 还是L->是一个整体呢?部分代码如下:int insert_Sq(SqList *L,int i,char c) //参数i:插入的位置(数组elem中的位置),参数c:要插入的值 { if (iL->len+1) { printf( 在下面程序中STATUS ListInsert(List *L,int i,ElemType e) {struct STU *p,*q; if (iL->length+1) return ERROR; q=&(L->elem[i-1]); for(p=&L->elem[L->length-1];p>=q;--p) *(p+1)=*p; *q=e; ++L->length; return OK; }/*ListInsert Before i */这是数据 L是什么,结构体吗,L.elem又是啥 还有L.length,typedef struct{int *elem;int length;int listsize;}SqList;int InitList_Sq(SqList &L){L.elem=(ElemType*)malloc(LIST_INIT_SIZE*sizeof(ElemType));if(!L.elem) return ERROR;L.length=0;L.listsize=LIST_I 数据结构中 符号 +=