C by Dissection chapter 12 exercise 11

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • southside1415
    New Member
    • Apr 2010
    • 2

    C by Dissection chapter 12 exercise 11

    hey guys, noob here. Im just wondering if anyone can help me with the code for this exercise. the exercise says

    modify the header file list.h in section 12.9 by replacing the typedef line with
    Code:
    struct data {
      char name [10];
      int age;
      int weight;
    };
    typedef    struct data DATA;
    write a function create_list() that transforms an array of type DATA into aa linear linked list. Write another function that counts the number of people above both a given weight.

    the link.h from section 12.9 is as follows:

    Code:
    #include <stdio.h>
    
    typedef   char   DATA;
    
    struct linked_list {
      DATA                       d;
      struct linked_list     *next;
    };
    typedef   struct linked_list ELEMENT;
    typedef   struct linked_list LINK;
    ----------------------------------------------------------
    if someone can help me with the code for this exercise that would be great! thanx!
    Last edited by Frinavale; Apr 27 '10, 09:47 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • hype261
    New Member
    • Apr 2010
    • 207

    #2
    What exactly is the problem you are having with the code exercise?

    Comment

    • jkmyoung
      Recognized Expert Top Contributor
      • Mar 2006
      • 2057

      #3
      Are you having problems with a particular part of implementing the exercise, or are you having a problem breaking up the problem into parts?

      Either way, what steps have you broken the problem into so far?

      Comment

      • southside1415
        New Member
        • Apr 2010
        • 2

        #4
        nvm guys i think i got it after working with a friend on it. thanx anyways!

        Comment

        Working...