pablosotol

Tarea 01 (Estatico)

Oct 10th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #define _MAX 2
  2.  
  3. #include<stdio.h>
  4. #include<stdlib.h>
  5. #include<stdint.h>
  6.  
  7.  
  8. struct s_nodo{
  9.  
  10.     uint8_t ID;
  11.     struct s_nodo* v;
  12.  
  13. };
  14.  
  15. typedef struct s_nodo s_n;
  16. typedef struct s_nodo* p_n;
  17.  
  18. void crea_nodo(p_n *a, uint8_t ID){
  19.      n->ID=ID;
  20.      a->v=NULL;
  21.      
  22. }
  23.  
  24. int main(){
  25.  
  26.     s_n nodo[_MAX];
  27.     p_n inicio,cursor;
  28.    
  29.     crea_nodo(&nodo[0],'A');
  30.     crea_nodo(&nodo[1],'B');
  31.  
  32.     inicio=&nodo[0];
  33.    
  34.     nodo[0].v=&nodo[1];
  35.     nodo[1].v=NULL;
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment