Wednesday, June 20, 2018

Create first Node of Single Link List

#include <iostream>

using namespace std;

struct node
{
    int data;
    node *n;
};
struct node *h,*e,*t;
void create1stNode()
{
    t=new node;
    cout<<"Enter Data in first Node: "<<endl;
    cin>>t->data;
    t->n=0;
    e=t;
    h=t;

}
int main()
{
create1stNode();

 return 0;
}




No comments:

Post a Comment