List and array

This is a discussion on List and array within the C Programming forums, part of the General Programming Boards category; How does the list differ from array? I mean what is the difference between list and array?...

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

    List and array

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

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    An array can be considered a list. However, you're probably thinking of linked lists. The typical linked list is like so:
    Code:
    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...

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    1

    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, 04: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

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