#include <stdio.h>
#include <stdlib.h>
#define LISTINITSIZE 20
#define INCREAMENT 5
typedef int ElemType;
typedef struct {
ElemType *elem;
int length;
int listsize;
} Seqlist;
void Initlist(Seqlist *L) {
int n, i;
L->elem = (ElemType *)malloc(sizeof(ElemType) * LISTINITSIZE);
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &L->elem[i]);
}
L->length = n;
L->listsize = LISTINITSIZE;
}
void Prtlist(Seqlist L) {
int i;
for (i = 0; i < L.length; i++) {
printf("%d ", L.elem[i]);
}
}
void fun(Seqlist *L) {
Seqlist *La;
int i=L->length-1,j=0,q;
La->elem=(ElemType*)malloc(sizeof(ElemType)*LISTINITSIZE);
for(;i>=0;i--){
La->elem[j]=L->elem[i];
La->length++;
j++;
}
for(q=0;q<L->length;q++){
L->elem[q]=La->elem[q];
La->length--;
}
}
int main(void) {
Seqlist L;
Initlist(&L);
fun(&L);
Prtlist(L);
}