1. #include<iostream.h> class linklist{ private: struct node { int data; node *link; }*p; public: linklist(); void add(int num); void display(); int count(); void del(int num); ~linklist(); }; linklist::linklist() { p=NULL; } void linklist::add(int num) { int s; node *r,*temp=p; num=n; if(num!=0) { s=n%10; n=n/10; r=new node; r->data=s; r->link=temp; temp=r; } }  void linklist::display() { node *temp=p; cout<<endl; while(temp!=NULL) { cout<<temp->data<<" "; temp=temp->link; } } int linklist::count() { node *temp=p; int c=0; while(temp!=NULL) { temp=temp->link; c++; } return c; } linklist::~linklist() { node *q; while(p!=NULL) { q=p->link; delete p; p=q; } } void main() { linklist l; int n; cout<<"\n enter  n element"; cin>>n; cout<<"\n elements in the linked list:"; l.display(); cout<<"\n NO:of elements in linked list:"<<l.count(); }