class Node{ public:
int data;
Node * next
}; Node *p1 = new Node, *p2 = new Node, *p3 = new Node;
p1->data = 12; p2->data = 34;
p1->next = p2; p2->next = p1;
cout << p2->data<< “ ” << p2->next->data<<endl;
cout << P1->next->data<< “ ” << P1->next->next->data;
P1->data = 12; p2->data = 34;
*P1 = *P2;
cout << p2->data<< “ ” << p2->next->data<<endl;
cout << P1->next->data<< “ ” << P1->next->next->data;
P1->data = 12; p2->data = 34; p3->data = 34;
P1->next = p2; P2->next = p3; P3->next = 0;
cout << P1->data<< “ ” << p1->next->data<< “ ” <<
p1->next->next->data << “ ”<<p3->data;
Why should we? Some whitespace-delimited numbers.
Why don't you make it a complete program and run it? As is, it won't compile.