creating of node

PHOTO EMBED

Wed Oct 16 2024 03:14:34 GMT+0000 (Coordinated Universal Time)

Saved by @E23CSEU1151

#include <iostream>
using namespace std;

struct node{
    int data;
    struct node* link;
};
int main()
{
    struct node* head = new node;
    
    head ->data=45;
    head ->link=NULL;
    
    cout<< "new node value is "<< head ->data;
}
content_copyCOPY