473,395 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Adding student marks to a Linked List

I was given to write a C program using Linked list to enter student marks, but i can't figure out how this node insertion works:
how nodes are linked with each other???


A Computer Training Institute wants to store marks of the Theory and Practical Papers of Data Structures & Algorithm. This system keeps the Registration Number and the Name other than the two marks, and all the records should be inserted in increasing order of the Registration Number.

• Use a suitable data structure to solve this problem.
• Store at least 5 different records in your program.
• Display all the records you have stored. All the records should be displayed as follows.



Reg. No Name Theory Practical
101 Silva 55 30
102 Perera 38 28
104 Fernando 55 20
105 Peries 15 18

• Now write a function/s to insert the records of the students whose Registration Numbers are 103 and 106 in the correct positions.

• Write a function to search a given student record specified by the registration number.

• Display all the items again and check whether they have inserted properly.


thanks in advance
Sep 2 '09 #1
3 6940
OraMaster
135 100+
@praveenaj
You may need to know
1. What are linked lists and their types and how it works?
2. Try to insert a node into an ordered linked list on the basis of reg. no. (this is what u need to implement)
Try to search on Google for the same and do some programming stuffs and let everybody know what you understood and what problems you are facing.
Kind Regards,
Bhushan
Sep 2 '09 #2
weaknessforcats
9,208 Expert Mod 8TB
I stingly recommend that you write a single function that inserts NodeB after NodeA:

Expand|Select|Wrap|Line Numbers
  1. Insert(Node* NodeA, Node* NodeB);
and use this function in the rest of your linked list code. This will avoid re-solving the node insertion over and over and over again.

Are you allowed to use C++? If so, you can use the linked list container list<> where all this have been done professionally aned debugged for you. Otherwise, you will need to re-invent this wheel again.
Sep 3 '09 #3
weaknessforcats
9,208 Expert Mod 8TB
I forgot to say that the Insert function from my previous post will have only 5 lines of code in it.
Sep 3 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Marek Mänd | last post by:
<style type="text/css"> q:after{content:',"'} </style> <q>This will be the shame of CSS</q> claimed Marek Mänd and added that <q>consumers expect to create generated content via CSS where there...
2
by: PRadyut | last post by:
In this code i tried to add the elements in ascending order but the output is only 0 1 2 the rest of the elements are not shown. the code...
3
by: sandy | last post by:
I am a student who is losing his mind. The code below is a header file which has the line: void ClearList(ListType *list); which generates the following compile time errors: variable or...
6
by: sandy | last post by:
I am creating a class (or so I hope) which is to be a JobCollection, linked list of 'Job'. Job is another class already created. JobCollection is just the linked list manager. I have to have...
18
by: mankolele | last post by:
How do I restrict a person from seeing evrything that I have on my database to them seeing only their information and products for them to be able to UPDATE,EDIT and DELETE their own only Thanx
11
by: CrostonScottish | last post by:
I've got myself a bit mixed up with all my sqls and subforms. I am a bit new to relationship databases. I have a database designed for booking students on to courses run at our hospice. It is...
3
by: Synapse | last post by:
hi everyone..im trying to create a student list program using linked list that will display all my info of students..but it seems theres a little prob. after i enter my first student the program will...
2
by: xpertbyshishir | last post by:
I am working on a Asp.Net project where i want to add controls with each row that i add to the design . i'l explain with an example.. suppose i have student name as my main fieldname, whose...
1
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.