Indicate how the pointers are used to establish a link between nodes - counter
Sponsored Links


Popular Links


List of Abbreviations

National Highways in India

States & Union Territories of India

Currency of All Countries

Indicate how the pointers are used to establish a link between nodes

You are Here: Home > Computer Subjects > Programming in C Language > …

Indicate how the pointers are used to establish a link between nodes.

Ans. A node is used to create linked data structure like Linked list. A node has one data field and one or more link fields to other nodes. The pointer concept is used to link to nodes.

In C++, a node can be implemented by defining either a structure or class:

struct Node                               class Node
{                                             {
     int data;                                    private:
     Node *link;                                           int data;
}                                                             Node *link;
                                              };
  ----------      ----------       ----------
| data | o--|--->| data | o--|--->|  data | o |
  ----------      ----------       ----------

Click Here to Find Latest Jobs and Current Affairs
Updated: May 31, 2013 — 2:18 pm

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2016. All Rights Reserved. WikiIND.com