Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

data structure assingment using linklist plzzzzz help meeee

linked list

  • Please log in to reply
1 reply to this topic

#1 shahmalik

shahmalik

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 18 March 2012 - 05:39 AM

Write a program to maintain result for data structures course. Result is to be maintained as a linked list. Here are the functions that your program should offer (They should be the options in your MENU):
- Add : Accept reg_no and marks from user. Create an entry with the corresponding values and insert it in the linked list. Make sure entry is inserted at the correct position as the list is sorted.

- Find : Take reg_no from user, If record is found display marks of student. If record is not found display a message "not found".

- Delete : Delete the entry of the result corresponding to the reg_no. If no such reg_no exists, print a message indicating “record not found”.

- Display: Display the contents of linked list.

- Exit

You will need to define a class for an entry in the result containing a pointer to the next entry.
class entry {
int reg_no;
int marks;
entry * next ;
}

---------- Post added at 06:34 PM ---------- Previous post was at 06:33 PM ----------

plzzzz plzzzz help me out i dnt know how i implement entry in linklist

---------- Post added at 06:36 PM ---------- Previous post was at 06:34 PM ----------

plzzzz plzzzz help me out i dnt know how i implement entry in linklist

---------- Post added at 06:39 PM ---------- Previous post was at 06:36 PM ----------

i submit it tomarrow plzzz help me
  • 0

#2 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 18 March 2012 - 02:35 PM

As you have the class there, you need to create instances of it and linke them to eachother properly. Have you understood what a linked list actually is?
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.






Also tagged with one or more of these keywords: linked list

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download