Thread: List and array

  1. #1
    Registered User planet_abhi's Avatar
    Join Date
    Oct 2002

    List and array

    How does the list differ from array?
    I mean what is the difference between list and array?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    An array can be considered a list. However, you're probably thinking of linked lists. The typical linked list is like so:
    struct node {
        struct node *next;
        /* some data variable goes here */
    And so, what you do is create an instance of a node, and make it point to another node, which points to another node, and so on...

    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Feb 2003

    Thumbs up

    list...i assume u r talking about linked lists..are dynamic data structures. unlike array, the number of list members can be changed dynamically. also u can have different data types as members of a list node.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting linked list please help with CODE
    By scarlet00014 in forum C Programming
    Replies: 3
    Last Post: 09-27-2008, 11:24 PM
  2. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10:10 AM
  3. linked list inside array of structs- Syntax question
    By rasmith1955 in forum C Programming
    Replies: 14
    Last Post: 02-28-2005, 05:16 PM
  4. How can I traverse a huffman tree
    By carrja99 in forum C++ Programming
    Replies: 3
    Last Post: 04-28-2003, 05:46 PM