| Current Path : /var/www/html/venkat/old/old/ |
| Current File : /var/www/html/venkat/old/old/iit2015130_4.c |
#include<stdio.h>
struct linkedlist{
int num;
struct linkedlist *next;
};
typedef struct linkedlist node;
main()
{
node*list;
node*p;
void create(int *p, node*list);
void print (node*list);
create(list);
print(list);
}
void create( int*p, node *list)
{
int n;
scanf("%d",&n);
scanf("%d",& list->num);
while( list->next != NULL)
p = (node*)malloc(sizeof(node));
list->num =(node*)malloc(sizeof(node));
create(p,list->next);
}
void print (node*list)
{
if( list->next == NULL)
printf("%d",list->num);
else
print(list->next);
}