Singly Linked List Data Structure Program using Pointers in C Language Programming is as follows.
#include<stdio.h> #include<conio.h> #include<alloc.h> struct linkedlist { int info; struct linkedlist *next; }; typedef struct linkedlist node; node* makenode(int); main() { node *head, *p, *z; int x; char c='y'; clrscr(); printf("Enter the number"); scanf("%d", &x); head=makenode(x); p=head; printf("\nDo you want to continue\n"); fflush(stdin); scanf("%c", &c); while(c!='n') { printf("\nEnter the Number"); scanf("%d", &x); z=makenode(x); p->next=z; p=z; printf("\nDo you wan to continue\n"); fflush(stdin); scanf("%c", &c); } p=head; while(p!=NULL) { printf("\t%d", p->info); p=p->next; } getch(); return 0; } node* makenode(int x) { node *z; z=(node*) malloc(sizeof(node)); z->info=x; z->next=NULL; return z; } //end of program//