How do i use singly linked lists to store name ..

This is a discussion on How do i use singly linked lists to store name .. within the C Programming forums, part of the General Programming Boards category; How do i use singly linked list to store a name.. and hw could i use lists to sort the ...

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    2

    Post How do i use singly linked lists to store name ..

    How do i use singly linked list to store a name.. and hw could i use lists to sort the list of names in an alphabatic order..

  2. #2
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,308
    By writing code, using google where necessary, and posting the code here when you get stuck.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  3. #3
    Registered User
    Join Date
    Nov 2009
    Location
    Italy
    Posts
    65
    Quote Originally Posted by uday.rnsit View Post
    How do i use singly linked list to store a name.. and hw could i use lists to sort the list of names in an alphabatic order..
    you just need to declare a structure like
    Code:
    struct node {
    char name[buff];
    struct node* next;
    }
    to sort the list in an alphabetic order you need to use strcmp() and do an insertion sort

  4. #4
    Registered User
    Join Date
    Apr 2010
    Posts
    2
    Thank u rob...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Doubly linked lists
    By mohanlon in forum C Programming
    Replies: 8
    Last Post: 12-08-2010, 01:01 AM
  2. Singly linked lists tutorial, problem with malloc
    By Protolocke in forum C Programming
    Replies: 13
    Last Post: 04-24-2010, 12:14 AM
  3. Linked Lists
    By bleuz in forum C++ Programming
    Replies: 1
    Last Post: 03-29-2010, 05:24 PM
  4. Linked Lists 101
    By The Brain in forum C++ Programming
    Replies: 5
    Last Post: 07-24-2004, 05:32 PM
  5. Replies: 2
    Last Post: 01-18-2003, 01:32 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21