Guest User

Untitled

a guest
Jul 1st, 2012
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. how to find the size of a LINKED LIST (data structure) in c language?
  2. Here is how the function will look like.
  3.  
  4. int size(Node *head)
  5. {
  6. int len = 0;
  7. while(head != null)
  8. {
  9. len++;
  10. head = head->next;
  11.  
  12. }
  13. return len;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment