c program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sasidharan091
    New Member
    • Aug 2009
    • 6

    c program

    how the data structure is used in c language
  • MrPickle
    New Member
    • Jul 2008
    • 100

    #2
    You will have to be a little bit more specific.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      A struct is the only way in C to group your data items together.

      If you have a mailing list application, you might have a struct that groups the person's name, address, city, state and zip data items. Then you create variables of the struct.

      This is much easier than using arrays of names plus arrays of addresses plus arrays of cities plsu arrays of states plus arrays of zip codes and then try to keep this all straight as you add and delete people from the mailing list.

      Comment

      • OraMaster
        New Member
        • Aug 2009
        • 135

        #4
        Originally posted by sasidharan091
        how the data structure is used in c language
        Are you looking for how to use struct in C language or you asked something related to Data Structure like Stack, Queue and Linked Lists etc. FYI...you can use arrays for implementing Stack and Queues data structures and Struct for implementing Linked Lists respectively.

        Comment

        • sasidharan091
          New Member
          • Aug 2009
          • 6

          #5
          Originally posted by MrPickle
          You will have to be a little bit more specific.
          I want to know about the singly linked list and doubly linked list

          Comment

          • OraMaster
            New Member
            • Aug 2009
            • 135

            #6
            Originally posted by sasidharan091
            I want to know about the singly linked list and doubly linked list
            It might help you in understanding these stuffs.

            Comment

            • donbock
              Recognized Expert Top Contributor
              • Mar 2008
              • 2427

              #7
              Originally posted by sasidharan091
              I want to know about the singly linked list and doubly linked list
              Oh .. so when you referred to "data structure" in your original post you weren't asking about the struct keyword in general, you want know how to set up a structure that is suitable for use in a singly and/or a doubly linked list.
              Is that right?

              Is this a different question than Linked lists and arrays or do you want to retire one of these threads?

              Comment

              • JosAH
                Recognized Expert MVP
                • Mar 2007
                • 11453

                #8
                Originally posted by donbock
                Oh .. so when you referred to "data structure" in your original post you weren't asking about the struct keyword in general, you want know how to set up a structure that is suitable for use in a singly and/or a doubly linked list.
                Is that right?

                Is this a different question than Linked lists and arrays or do you want to retire one of these threads?
                I guess the OP wants to know things about linked lists and/or arrays; we got one step further than 'the structure'; I'll close this thread and we continue this tiresome story in the other thread.

                kind regards,

                Jos

                Comment

                Working...