Advertisement
apl-mhd

Bappy sir

Mar 15th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5.  
  6. struct list{
  7.    int lData;
  8.    int rData;
  9.    int tData;
  10.    int bData;
  11.    struct list *lNext;
  12.    struct list *rNext;
  13.    struct list *tnext;
  14.    struct list *bNext;
  15.  
  16. };
  17.  
  18. typedef struct list node;
  19.  
  20.  
  21. node *insertData(node *head){
  22.  
  23.  
  24.  
  25.    return head;
  26. }
  27.  
  28. void display(node *head){
  29.  
  30.  
  31.  
  32. }
  33.  
  34. int main()
  35. {
  36.     node *head, *temp, *temp2;
  37.  
  38.     head = new node();
  39.  
  40.  
  41.     temp = new node();
  42.     temp->rData = 20;
  43.     temp->rNext = NULL;
  44.  
  45.     temp2 = new node();
  46.  
  47.     temp2->rData = 10;
  48.     temp2->rNext = temp;
  49.  
  50.     head->rNext = temp2;
  51.  
  52.  
  53.     printf("%d ", head->rNext->rData);
  54.  
  55.  
  56.  
  57.  
  58.     return 0;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement