Thread: Help on Linked list

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    41

    Help on Linked list

    I'm reading about linked list in my book "Sams teach yourself C in 21 days" Yeah 21 days..., but it doesnt really discribe what a linked list will be used for. What will it be used for? What does it do? Please help
    Shouldent NULL be, 78, 85, 76, 76, or just 0 or, 4E, 55, 4C, 4C

  2. #2
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    When you are writing a program, a main issue is to optimize the memory your program uses to the fullest.
    Consider you had a variable in your program which would be needed to store roughly near 1000 items. Say, this number could fluctuate any where between 0 to 10000 during run time. If the number fluctuated down to 0, you would have had no problem, except that you had only wasted 999 memory blocks. If the need was for 10000, you would require much more memory than what had been allocated. To cater to this problem, Linked List is the solution (One kind of Data Structure). In a Linked List, you allocate memory and free them dynamically as and when there is a need/no need.

    Here's a document on the same: http://cslibrary.stanford.edu/103/LinkedListBasics.pdf
    Last edited by shaik786; 06-08-2002 at 01:09 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ Linked list program need help !!!
    By dcoll025 in forum C++ Programming
    Replies: 1
    Last Post: 04-20-2009, 10:03 AM
  2. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10:10 AM
  3. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 10:01 AM
  4. Template Class for Linked List
    By pecymanski in forum C++ Programming
    Replies: 2
    Last Post: 12-04-2001, 09:07 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM