#include<stdio.h> #include<stdlib.h> typedef struct num { int num; struct num* next; }linklist; void create(int n) { linklist *head,*node,*end; head =(linklist*)malloc(sizeof(linklist*)); end =head; for(int i=1;i<=n;i++) { node =(linklist*)malloc(sizeof(linklist*)); scanf("%d",&node->num); node->next = NULL; end->next=node; end=node; } end =head; while(end->next) { end =end->next; printf("%d ",end->num); } } int main() { int n; scanf("%d",&n); create(n); return 0; }