Thread: Advanced C

  1. #1
    Registered User
    Join Date
    May 2004

    Advanced C

    How does one create a function that takes info from an array and transforms it into a linear list?

    Suppose the typedef is used:

    Create a typedef DATA as
     typedef struct {
                   char name[10];
                   int age;
                   int weight;
    } DATA;
    Write a function create_l() that transforms an array of such data into a linear list.
    How do i go about doing this?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    First off, this isn't advanced, but what the hell... By definition, an array is a linear list. See here. It's a PDF. I'll quote:
    A data structure is said to be linear if its elements form a sequence or a linear list.

    Linked Lists
    Stacks, Queues
    Next, we're not in the practice of doing your (home-)work for you, so you'll have to post your attempt first, and not just a data definition. I'll assume you mean a linked list, in which case, I suggest you search the forum for said topic. Try not to stagger under the weight of the search results.

    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    May 2004
    Sorry, yeah i do believe it meant linked list. No i'm not asking you or anybody to do my homework for me. just point m to the examples and i'll do the rest meself.....thanx

  4. #4
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Tutorial on Link Lists

    Now if you have any specific questions about something you don't understand we are more then willing to answer those

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What's advanced c++ contents ?
    By toysoldier in forum C++ Programming
    Replies: 8
    Last Post: 09-27-2004, 08:12 PM
  2. Advanced? Not Advanced? Anyone?
    By Jotun in forum C++ Programming
    Replies: 3
    Last Post: 04-28-2004, 08:02 PM
  3. Advanced but yet general
    By Rhodium in forum C Programming
    Replies: 6
    Last Post: 08-09-2003, 12:46 PM
  4. Advanced Linux Programming
    By drdroid in forum A Brief History of
    Replies: 2
    Last Post: 07-24-2003, 02:01 PM
  5. you advanced people, read this
    By Leeman_s in forum C++ Programming
    Replies: 2
    Last Post: 10-04-2001, 08:26 PM